I'm a new bee for google actions and trying my first project. I trying to get the user information like, name, email from the JWT token which I receive from google actions after my invocation but the token I received doesn't contain the information irrespective of account linking. This is the decoded token I received from my logs,
{
"iss": "https://accounts.google.com",
"aud": "project1",
"nbf": 1625244516,
"iat": 1625244816,
"exp": 1625244936,
"jti": "2f452573118d0bf97dac80abe45c07eb91dec6c"
}
I am expecting something like below,
{
"sub": 1234567890, // The unique ID of the user's Google Account
"iss": "https://accounts.google.com", // The token's issuer
"aud": "123-abc.apps.googleusercontent.com", // Client ID assigned to your Actions project
"iat": 233366400, // Unix timestamp of the token's creation time
"exp": 233370000, // Unix timestamp of the token's expiration time
"name": "Jan Jansen",
"given_name": "Jan",
"family_name": "Jansen",
"email": "jan@gmail.com", // If present, the user's email address
"locale": "en_US"
}
I tried all below but didn't help:
- Enabling non-sensitive scopes like user email and profile in OAuth Consent screen.
- Enabled account linking flow. I used our internal oAuth server for token & auth urls. clientId & secret are configured from our internal oAuth server.
- Enabled Google People API as suggested in some stackoverflow, not sure how much value this adds.
- Tried comment 7 here.
Appreciate your help here.