Skip to content

patilvishi/springboot-oauth2-google

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

🚀 Spring Boot OAuth2 (Google Login Integration)

📘 What You’ll Learn

  • Integrate Google Login using Spring Boot OAuth2.
  • Configure Spring Security to handle OAuth2 clients.
  • Use @AuthenticationPrincipal to get Google user details.
  • Display profile info and support logout.

🧱 Key Dependencies

  • spring-boot-starter-oauth2-client
  • spring-boot-starter-security
  • spring-boot-starter-thymeleaf

▶️ How to Run

  1. Create a Google OAuth2 Client at https://console.cloud.google.com/

  2. Add redirect URI:
    http://localhost:8080/login/oauth2/code/google

  3. Update your application.yml with your credentials.

  4. Run:

    mvn spring-boot:run
  5. Visit: http://localhost:8080/

  6. Login with Google and see your name, email, and picture displayed

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published