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
- Visit GitHub application manager: https://github.com/settings/applications/new (if you don’t have an account, create an GitHub account first)
- Fill input like this:
- Application name: Your Project Name
- Homepage URL: http://your-site.com
/dashboard/user
- Authorization callback URL: http://your-site.com
/github/callback
- Click “Register application” button.
- Copy your API keys
- Click the Generate a new client secret and generate key.
- Copy ClientID and paste to your
.env
file like thisGITHUB_CLIENT_ID=YOUR_ID
- Copy Client secret and paste to your
.env
file like thisGITHUB_CLIENT_SECRET=YOUR_SECRET_KEY
- Go to the Settings > General and find Social Login area and enable Github. Then save settings.
- Visit Google API Console: https://console.developers.google.com/ (if you don’t have an account, create Google account first)
- Create a new project
- Set project name and click Create
- Click “Credentials” on the side menu then “Create Credentials > OAuth client ID”
- Click the configure
- Set “External”
- Fill Application name and email then complete the process.
- Again: Click “Credentials” on the side menu then “Create Credentials > OAuth client ID”
- Fill 1 and 2 points as example
- Paste your keys
- Copy ClientID and paste to your
.env
file like thisGOOGLE_CLIENT_ID=YOUR_ID
- Copy Client Secret and paste to your
.env
file like thisGOOGLE_CLIENT_SECRET=YOUR_KEY
- Copy ClientID and paste to your
- Go to the Settings > General and find Social Login area and enable Google. Then save settings.
- Follow these steps: https://developers.facebook.com/docs/development/create-an-app/
- 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
- Paste your keys
- Copy App ID and paste to your
.env
file like thisFACEBOOK_CLIENT_ID=YOUR_ID
- Copy App Secret and paste to your
.env
file like thisFACEBOOK_CLIENT_SECRET=YOUR_KEY
- Copy App ID and paste to your
- Go to the Settings > General and find Social Login area and enable Facebook. Then save settings.