A client registration associates an OAuth client with its provider, credentials, authentication method, redirect URI, and requested scopes. In a Spring application, these details let the client call a custom authorization server and receive the authenticated user after login. section 16.1.3
A custom provider registration typically specifies:
- A provider name, client ID, and client secret. section 16.1.3
- A client authentication method, commonly HTTP Basic through client_secret_basic. section 16.1.3
- A redirect URI matching one registered by the authorization server. section 16.1.3
- Requested scopes that are also registered on the authorization server. section 16.1.3
For simple deployments, Spring Boot properties can configure the registration. More flexible deployments create a ClientRegistration and provide it through a ClientRegistrationRepository, allowing credentials or enabled providers to come from custom logic, a database, or a vault. section 16.1.4
Custom authorization server
Run the authorization server at 127.0.0.1 and the web application at localhost to keep browser sessions distinct. Configure the issuer at http://127.0.0.1:7070 and use the callback /login/oauth2/code/my_authorization_server. section 16.1.3
http://localhost:8080/login/oauth2/code/my_authorization_server
Inspect the standard OAuth login callback URI used by the custom provider. section 16.1.3
