I have two questions.
First questions: I’m using lock.js. Is there a way to add different placeholder values for custom user_metadata in the language dictionary?
Sorry if this is already expressed elsewhere in the documentation. I couldn’t find it so maybe someone could point me in the right direction.
Second question: Is there any way to view user_metadata through auth0.js, not lock or management API?
Thanks in advance.
Hi @pickledplum,
Can you give an example of this?
You can add the metadata to the id token via a custom claim in a rule. This will make it available in you auth0.js app.
Here is an example:
function (user, context, callback) {
const namespace = 'https://myapp.example.com/';
context.idToken[namespace + 'preferred_contact'] = user.user_metadata.preferred_contact;
callback(null, user, context);
}
Let me know if anything needs clarification.
Thanks,
Dan
dan.woda
Closed
3
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.