I developed a Google OAuth2 Login in Spring Boot and its working fine. I want to redirect to some specific URL after a button has been clicked. I am using an application.yml
with Google Oauth2.
I want to redirect to a specific URL after my authentification.
Here is the code I use for Google OAuth2:
Application.yml
security:
oauth2:
client:
clientId: <Google Client Id>
clientSecret: <Google Secret Id>
accessTokenUri: https://accounts.google.com/o/oauth2/token
userAuthorizationUri: https://accounts.google.com/o/oauth2/v2/auth
clientAuthenticationScheme: form
scope:
- openid
- email
- profile
resource:
userInfoUri: https://www.googleapis.com/oauth2/v3/userinfo
preferTokenInfo: true