Skip to content

05. Social Authorization

ninacoder-info edited this page Dec 7, 2020 · 4 revisions

Facebook Socialite Authentication

Firstly, we create our Facebook app so that we can get a ‘client_id’ and ‘client_secret’ from Facebook.

Screen Shot 2020-08-20 at 10 45 09

We do this by going to Facebook’s developers URL: https://developers.facebook.com/ and log in with your Facebook account. Go to ‘My Apps’, proceed to ‘Add New App’ as shown below…

Screen Shot 2020-08-20 at 10 46 38

Next, input your App name and click on ‘Create App Id’ as shown below…

Screen Shot 2020-08-20 at 10 54 25

Next, go to Settings -> Basic, copy your app_id and app_secret.

Screen Shot 2020-08-20 at 10 45 32

Remember to click on show to view and copy your app_secret. This is illustrated below…

Screen Shot 2020-08-20 at 10 45 58

Next, click on the ‘+’ button beside ‘PRODUCTS’, select ‘Facebook Login’, also select ‘www’. Then add your website URL: https://yoursite.com and click on ‘Save’ as shown below… We’re done with all App settings, now let’s go over to STEP 4. STEP 4: Now got to your ‘.env’ file and update with these:

FACEBOOK_APP_ID=xxxxxxxxxxxxxxxx

FACEBOOK_APP_SECRET=xxxxxxxxxxxxxxxxxxxxxx

FACEBOOK_APP_CALLBACK_URL=https://musicengine.top/connect/callback/facebook

  • Remember to replace APP_ID and APP_SECRET with those received from facebook.

Google Socialite Authentication

Create your app in Google 🌈

Create a project: https://console.developers.google.com/projectcreate Create credentials: https://console.developers.google.com/apis/credentials 1_opTTwMBRSBbYSnkbS8H1nA

Config callback url to https://musicengine.top/connect/callback/google

A modal will pop up with your apps client id and client secret. Add these values to your .env file. Or Just use admin -> settings

Twitter Socialite Authentication