Auth0 Home Blog Docs

Universal Login : Retrieving app_metadata, user_metadata or custom properties set through rules

rules
#1

I have an angular application that uses the Universal login. But in the hash returned by the authorize() method, I can’t find a way to retrieve either user_metadata, app_metadata or custom properties setted in a custom rule.

My WebAuth object is created this way :
private _Auth0 = new auth0.WebAuth({
clientID: environment.auth.CLIENT_ID,
domain: environment.auth.CLIENT_DOMAIN,
responseType: “id_token token”,
redirectUri: (environment.auth.CALLBACK_URL),
scope: “openid profile email”
});

In the retuned hash, my idTokenPayload only contains the following properties :
at_hash
aud
email
email_verified
exp
iat
iss
name
nickname
nonce
picture
sub
updated_at

#2

Ok, I realized that I must absolutely prefix my custom claims with “http://” prefix or auth0 removes them from teh idToken. :confused:

1 Like
#3

That is correct. Glad you figured this out! Let us know if you’ll need any help further down the road!

1 Like