Is there a way to attach some data to a user after he logged in ?
I want to implement it somewhere after he press logged in and according to his credintials (email) it will find the applicable data to this user and pass it to me so inside the user object. |right now the user object holds :
In order to add the data to the user after they log in you should use a post login action. You can add the data as a custom claim. To set custom claims in actions you can use the following methods:
Hi Dan,
Thank you for the quick response, I added some metaData manually via the “User Management” tab under “users” yet, I cannot see the metaData inside the user object I am getting after authenticating => const { user } = useAuth0();
I also tried this:
In addition, why https://${domain}/userinfo; this request is getting through but any other request such as https://${domain}/api/v2/users returns 403 error
You will need to use a rule to add the metadata to the token. The user object in your application is being pulled directly from the token. Here is an example rule that adds some metadata to the token: