reading_notes

Read: 17 - Spring Authorization

Spring Boot and OAuth2

There are several samples building on each other, adding new features at each step

Single Sign On with GitHub

GitHub Authorization Summary

  1. Create a project
  2. Add home page and make it public (basic static app with just a home page and unconditional login via Spring Boot’s OAuth 2.0 configuration properties (if you visit the home page, you will be automatically redirected to GitHub)).
  3. Secure the application (add dependencies)
  4. Add a new GitHub app.(add an explicit link that the user has to click to login).
  5. Add welcome page.
  6. Add logout button for authenticated users.
  7. Create the endpoints.
  8. Adding the Client Registration.
  9. Add users Data base.
  10. Add error page, when user in not defined or wrong password(add an error message for unauthenticated users, and a custom authentication based on GitHub’s API.).

** Example for OAuth2 GitHub authorization in image below:


Resources: