Social Login Setup

Social Login Setup

If you get any error during social login, please make sure about these:
  • Callback url
  • Cliend IDs and Secret Keys
  • Save keys to the .env file.

Github

  1. Visit GitHub application manager: https://github.com/settings/applications/new (if you don’t have an account, create an GitHub account first)

  2. Fill input like this:
    1. Application name: Your Project Name
    2. Homepage URL: http://your-site.com/dashboard/user
    3. Authorization callback URL: http://your-site.com/github/callback
    4. Click “Register application” button.
  3. Copy your API keys
    1. Click the Generate a new client secret and generate key.
    2. Copy ClientID and paste to your .env file like this
      GITHUB_CLIENT_ID=YOUR_ID
    3. Copy Client secret and paste to your .env file like this
      GITHUB_CLIENT_SECRET=YOUR_SECRET_KEY
  4. Go to the Settings > General and find Social Login area and enable Github. Then save settings.

Google

  1. Visit Google API Console: https://console.developers.google.com/ (if you don’t have an account, create Google account first)
  2. Create a new project
  3. Set project name and click Create

  4. Click “Credentials” on the side menu then “Create Credentials > OAuth client ID” 
  5. Click the configure
  6. Set “External” 
  7. Fill Application name and email then complete the process.

  8. Again: Click “Credentials” on the side menu then “Create Credentials > OAuth client ID”
  9. Fill 1 and 2 points as example
  10. Paste your keys
    1. Copy ClientID and paste to your .env file like this
      GOOGLE_CLIENT_ID=YOUR_ID
    2. Copy Client Secret and paste to your .env file like this
      GOOGLE_CLIENT_SECRET=YOUR_KEY
       
  11. Go to the Settings > General and find Social Login area and enable Google. Then save settings.

Facebook

  1. Follow these steps: https://developers.facebook.com/docs/development/create-an-app/
  2. Still if you didn’t add callback url, Click Facebook Login > Settings then fill Valid OAuth Redirect URIs as example: https://your-site.com/facebook/callback
  3. Paste your keys 
    1. Copy App ID and paste to your .env file like this
      FACEBOOK_CLIENT_ID=YOUR_ID
    2. Copy App Secret and paste to your .env file like this
      FACEBOOK_CLIENT_SECRET=YOUR_KEY
  4. Go to the Settings > General and find Social Login area and enable Facebook. Then save settings. 

Did you find this article useful?