app_metadata not returned in token

I have an angular 2 application using the hosted page but it is not returning the app_metadata in the token. Here is my configuration:

auth0 = new auth0.WebAuth({

clientID: '<myclientid>',
domain: '<mydomain>',
responseType: 'token id_token',
audience: 'https://<mydomain>/userinfo',
redirectUri: getCallBackPath(),
scope: 'openid profile user_metadata app_metadata'

});

If you are using an OIDC compliant flow, metadata cannot be requested in the scopes, as they are not part of the OIDC conformant claims. You will need to add the claims to the token via a Rule:

1 Like