Question Details

No question body available.

Tags

java google-cloud-platform google-oauth

Answers (1)

Accepted Answer Available
Accepted Answer
November 1, 2025 Score: 1 Rep: 5,863 Quality: High Completeness: 50%

The remainder of the OAuth2/OIDC ceremony, namely the exchange of the code for a token, is missing.

Your server needs to implement a Servlet with the path /Callback to process the callback provided in the callbackurl.

The internal processing of http://localhost:8081/Callback?code=xxxxxxxxxxxxxxxxxx should make a call to https://accounts.google.com/o/oauth2/token with the code as a parameter.

The call to https://accounts.google.com/o/oauth2/token will return the JWT for later use for authorization by the client.

This is the missing step.