Spring Social Login is a demo application of how to build authentication and authorization into your Spring Boot application based on OAuth2 identity providers, such as Facebook, GitHub, Google, and others.
MIT License
Spring Social Login is a demo application of how to build authentication and authorization into your Spring Boot application based on OAuth2 identity providers, such as Facebook, GitHub, Google, and others.
Let's take GitHub as a demo identity provider
Go to https://github.com/settings/apps to create a new app and get Client ID and Client secret after creation.
It's also important to provide "User authorization callback URL" during app creation, so that GitHub will redirect to our application after a user authorizes.
For the demo purposes set it to http://localhost:8080/login/oauth2/code/github
Clone the repository
git clone https://github.com/vzhemevko/spring-social-login.git
After cloning the repository go to src/main/resources/application.yml
and update you app GitHub ID and secret
github:
client-id: <GITHUB APP ID>
client-secret: <GITHUB APP SECRET>
Navigate to the root directory and build the project form the command line (alternatively, you can do it form IDE)
cd spring-social-login
gradlew build
Then you could run Spring Boot form the command line
gradlew bootRun
Or create run/debug configuration in your IDE with the main class
org.vz.spring.social.login.SpringSocialLoginApplication
After go to http://localhost:8080
Feel free to submit pull requests
This project is licensed under the MIT License