Google App Setup
After installing Socialite now you can in easy step integrate Google
with it to let your users login with their Google accounts.
Before you can integrate Google Sign-In into your website, you must have a Google API Console project. In the project, you create a client ID, which you need to call the sign-in API.
To create a Google API Console project and client ID, follow these steps:
- Go to https://code.google.com/apis/console/ .
From the project drop-down, select an existing project, or create a new one by selecting
- icon (create project)
In the sidebar under "APIs & Services", select Credentials, then select the OAuth consent screen tab.
Choose an Email Address, specify a Product Name , and press Save.
In the Credentials tab, select the Create Credentials drop-down list, and choose OAuth client ID
Under Application type, select Web application
Provide these URIs as the Authorized redirect URIs for your application as following:
If you installed Socialite in your domain directly like domain.com the URIs should be like these:
http://domain.com/account/google
http://domain.com/oauth2callback
If you installed Socialite in sub-domain like sub.domain.com the URIs should be like these:
http://sub.domain.com/account/google
http://sub.domain.com/oauth2callback
If you installed Socialite in a directory like domain.com/directory the URIs should be like these:
http://domain.com/directory/account/google
http://domain.com/directory/oauth2callback
- From the resulting OAuth client dialog box, copy the Client ID and Secret
The last thing, You will need to enable Google+ API. Goto Library page and click on Google+ API
- Now go to Socialite admin panel -> Environment settings and place the two keys and click the button "Save .ENV" as mentioned in the pictures below.