- Frontend wants to login via Google and uses the profile api.
- Profile api, in turn, accepts this request from Front and goes to Google to log in
- Authorization occurs through Google provider.
- After successful login, Google provider sends a response to the Profile api with user data.
- Profile api validates data that came from Google provider.
- Profile api gives Frontend access and refresh token.
add API credentials, (clientId and clientSecret)
frontendRedirectUrlAfterSuccessAuth ->
After successful authorization on the provider's side, it returns us a response with user data. We validate this data and if everything is successful, then we redirect the application that made the request to us, and provide tokens for authorization.
Spring OAuth2 doc
https://docs.spring.io/spring-security/reference/servlet/oauth2/login/core.html
https://spring.io/guides/tutorials/spring-boot-oauth2/
https://www.baeldung.com/spring-security-5-oauth2-login
Add Comment