I see that I can get the “org_id” which is great, but I want to know how can I retrieve the picture of the organization of the currently logged in user?
There is not a straightforward way to get the logo URL from the org in the user profile. You can add custom data to your organization with metadata. This would be a good place to store a URL pointing to a picture for your org:
I see the info but I dont know where I have to call this…
do you guys have a video tutorial? Explaining how this actions work?
That will be really helpfull,
Enrich the user profile
Auth0 provides a system for storing metadata on a User Profile. In order to set user_metadata or app_metadata on a user’s profile during their login, use the api.user.setUserMetadata or api.user.setAppMetadata functions.
/**
* @param {Event} event - Details about the user and the context in which they are logging in.
* @param {PostLoginAPI} api - Interface whose methods can be used to change the behavior of the login.
*/
exports.onExecutePostLogin = async (event, api) => {
api.user.setUserMetadata("favorite_color", "blue");
};