Creating a Google API Console project and OAuth2 Client ID

View more Tutorials:

Follow us on our fanpages to receive notifications every time there are new articles. Facebook Twitter

1- Google Social Login model

In order to login via Google social network, you need to create an application on Google Developers Console. In this application, you need to declare one or more valid ULRs to which your application is allowed to rederect after users loggin Google successfully. The application will supply you with a Client ID and a Password.
This is the model of steps which users need to carry out when logging into your website via Google social network.
The above-mentioned model shows that you need to create a aplication on Google Developers Console to get Client ID, Password and valid Redirect URLs.

Note that you can create one or more aplication from each of Google account.

2- Register Google Developers Console

Firstly, you need to log into Gmail. Then access to address:
In the first time, you do not have any Project, so you have to create it. In most cases, you should name Project same your Website name (It is not compulsory).
Your apps is created.
For each new Project, you need to activate Google+ API.
Google+ API is activated.
Next, you need to configure what users can see in the login process with Google  social network. You need to configure Consent Screen.
You need name Product same as the name of Project:
Next, you need to create a Credential, it including Client ID and password.
Enter URLs which your application is allowed to redirect to after users login Google successfully.
  • http://localhost:8080/login/oauth2/code/google
  • http://localhost:8899/SpringMVCSocialJdbc/auth/google
  • http://localhost:8080/SpringMVCSocialJdbc/auth/google
  • http://localhost:8080/auth/google
  • ....
Client ID and Password will also be created. You need to remember this information which is necessary for your application to login via Google.

View more Tutorials: