Skip to content

DenilssonMontoya/spring-oauth-social

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Social Login using Spring OAuth2 with Google

Learn how to create a social login with SPRING OAUTH + GOOGLE.

Prerequisites

Run Locally

Set environment variables

The following environment variables must be created, and their values must be taken from the Google OAuth credentials. Do not share these credential values with anyone.

  • GOOGLE_CLIENT_ID = {Client ID}
  • GOOGLE_CLIENT_SECRET = {Client secret}

GoogleOAuth03.png

Execute following commands to build and run the project.

# Build project & install dependencies
./gradlew build

# Run project 
./gradlew bootRun

Testing

Open a web browser and access the URL http://localhost:8080/personalInfo. Once this is completed you will be requested to log in with a Google account.

Step 1

Test01.png

Step 2

Test02.png

Step 3

Test03.png

Finally, by completing the login, information related to the logged user will be displayed. This information is provided by Google and can be used for multiple purposes in your application.

Test04.png

About

Social login with SPRING OAUTH + GOOGLE

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages