How to get user_metadata and app_metadata after login, using PHP SDK?

You can use a Rule to add the metadata as custom claim to the user info. Code in the rule would be something like this:

context.idToken['http://somenamespace/user_metadata'] = user.user_metadata;

Also see

1 Like