Show further information from access_token

Hey there
I was able to follow this tutorial here:

I now would like to show some more information on the End-Point: @GetMapping(value = "/private-scoped")
For example I would like to display some information from the access_token as well:

"All good. You can see this because you are Authenticated with a Token granted the ‘read:messages’ scope. Your sub is: “auth0|5dd02blablabla” and the iss is:“

I could not find examples on how to achieve this…
My end-goal would be to store some entries in my db with user-identifing information - and I thought I can use this sub id for that.

Thanks for your help!


Hello @alainz,

You can include arbitrary information from the user’s profile (or from other data sources) in the idToken and/or access_token using rules. You can also query the userinfo/ endpoint of the authentication API to request data from the user’s profile.

1 Like

Thanks for contributing that knowledge here Mark!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.