How to read user profile attributes user_metadata and app_metadata from SPA?

Hi @rjourdan_net,

If there are additional profile attributes that you want to see “all the time”, probably the simplest solution is to add the attributes you are interested in to the user’s id_token and / or access_token. You can add additional attributes, “custom claims”, to one token and / or the other dynamically using a Rule. For example:

You can add the entire user_metadata or app_metadata as a single custom claim, though I would suggest the above approach of adding just the attributes of interest.

You can also call the /userinfo endpoint at any time to query for additional profile data.