Starter Spring Boot project for OAuth login with GitHub
Simple starter for a Spring Boot Web application with GitHub OAuth support.
Steps:
- Create a GitHub App and get the Client ID and Client Secret values. (Specify callback URL as
http://localhost:8080/login/oauth2/code/github
for development, uncheck Web hooks) - Add those values in
application.yml
- Run the Spring Boot App. You should be able to login with GitHub
This is a super minimal app. Post login, you will be redirected back to the login page, but you can validate the authorized principal is created by accessing the /user
API.