- Follow this guide to configure Cognito in AWS: https://guides.micronaut.io/micronaut-oauth2-cognito/guide/index.html
- When modifying the app Settings, set this configurations:
- You will need to create a new Google OAuth 2.0 Client:
- Now replace the
client-id
,client-secret
and the necessary fields in issuer in theapplication.yml
. - Run the application and open http://localhost:8080/
- Click in Enter
- After sign in with Google, the authentication will fail with the message:
{"message":"JWT validation failed","_links":{"self":{"href":"/oauth/callback/cognito?code=xxxxxx....","templated":false}}}
- Go back to http://localhost:8080/ and click in Enter again. The authentication will be successful now.