A sample project that shows how to implement OAuth2 login using Github as a resource server
- Go to GitHub developer portal
- Create a new application and provide the required information
- Set the homepage URL to http://localhost:8080
- Authorization callback URL to http://localhost:8080/login/oauth2/code/github.
After creating a new application, you will a client ID and a client secret. Copy this two information and paste the in the application.yml
file
spring:
security:
oauth2:
client:
registration:
github:
clientId: github-app-client-id-here
clientSecret: github-app-client-secret-here