OAuth 2 login lets a Spring web application authenticate users through an external authorization server. Spring Security handles the authorization-code redirect flow, then returns authenticated users to the application. section 16.1 section 16.1.1
A standard implementation proceeds in a small sequence:
- Use preconfigured details for Google, GitHub, Okta, or Facebook, or define provider metadata for another authorization server. section 16.1.1 section 16.1.3
Custom authorization server
A custom provider uses a redirect URI such as http://localhost:8080/login/oauth2/code/my_authorization_server. The client registration supplies the client ID, secret, provider name, authentication method, and matching redirect configuration.
