Skip to content

This project involves implementing OAuth2 and Spring Boot for social login (Login with git hub account and Login with Google account), complete with a full step-by-step demonstration.

Notifications You must be signed in to change notification settings

SupuniAbeysinghe/OAuth2_Social_Login

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OAuth2 & Spring boot 3 & Social login

Step by step demonstration for login with github account and google account

01) Add OAuth2 Client dependency

image

02) Create the springboot application and open it in intelijIDE


Create Authorization server

GitHub

1. Settings - > developer settings

2

2. Then create a new app

image

3. Then generate new secret key and save Client Id and secret key

Google Account

http://console.cloud.google.com

1. create a new project

image

2. Then create an application

APIs and service - > Credentials-> OAuth 2.0 Client IDs

3. Then save the clientId and secret key

Create the Resource Server

create the end points and update the application.properties / application.yml file

application.properties

spring.security.oauth2.client.registration.github.clientId= <GITHUB CLIENT ID>
spring.security.oauth2.client.registration.github.clientSecret= <GITHUB SECRET KEY>
spring.security.oauth2.client.registration.google.clientId= <GOOGLE CLIENT ID>
spring.security.oauth2.client.registration.google.clientSecret= <GOOGLE SECRET KEY>

OR

application.yml

spring:
  security:
    oauth2:
      client:
        registration:
          github:
            clientId: <GITHUB CLIENT ID>
            clientSecret: <GITHUB SECRET KEY>
          google:
            clientId: <GOOGLE CLIENT ID>
            clientSecret: <GOOGLE SECRET KEY>

About

This project involves implementing OAuth2 and Spring Boot for social login (Login with git hub account and Login with Google account), complete with a full step-by-step demonstration.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages