How to get the user information from the token?
During callback from the authorize endpoint I exchange the code with token endpoint which gives me access_token, refresh_token and id_token. I have tried with all 3 tokens here, I am getting error https://zitadel.com/docs/apis/resources/auth/auth-service-get-my-user
The user is signedin fromthe google external provider.
ZITADEL Docs
Returns the full user object of the authenticated user including the profile, email, phone, etc
4 Replies
Is there a reason you are not using the standard oidc userinfo endpoint for that? On localhost the url looks something like this:
http://localhost:4444/oidc/v1/userinfo
https://zitadel.com/docs/apis/openidoauth/endpoints
ZITADEL Docs
OpenID Connect 1.0 Discovery
It's also possible to enable "User Info inside ID Token" in application settings if you don't want to make a separate query for userinfo
Yes but I wanted to list user sessions on my app, that can't be achieved though this
Try adding the scope
urn:zitadel:iam:org:project:id:zitadel:aud
this should add the aud of zitadel to the token so that they can be used against the api