How to get user meta from /userinfo endpoint?

Hey again @kkrp1 !

I would use a post-login Action to add custom meta_data claims to tokens instead - I just verified the following works:

exports.onExecutePostLogin = async (event, api) => {
  const namespace = 'https://my-app.example.com';
  if (event.authorization) {
    api.idToken.setCustomClaim(`${namespace}/user_metadata`, event.user.user_metadata);
    api.idToken.setCustomClaim(`${namespace}/app_metadata`, event.client.metadata);
  }
};

Some more on custom claims in general:

Hope this helps!