Registering your application for Google OAuth2 - spring-boot-in-practice/repo GitHub Wiki
In this section, we'll provide the steps to register your application with Google to use the Google OAuth2. You need your Gmail ID to proceed with this set-up.
- Head over to the Google Developer Conosle and Sign In with your Gmail ID
- Next, create a project by clicking on the New Project button and providing the required details.

-
Next, Click on OAuth consent screen in the left menu and select the app type:

-
Provide your application details:

-
Click on the
Credentialsin the left side menu and then click on Create Credentials and Select OAuth client ID
6. Select Web application:
7. Provide Web Application Details:
8. Provide the redirect URL. It must be the following https://localhost:8443/login/oauth2/code/google as we are using HTTPS:
9. Copy the Client ID and Secret:

You can use the Client ID and Secret in your application. Note that you keep the Secret in a safe place and should never expose it to anyone.