Is it possible to get the gravator or the default profile picture if I have a user id? I don’t want to make another rest call just to display the user profile picture.
I keep track of user ids in my local database, not auth0, which are part of a team.When it comes to displaying the team members belonging to a team, I rather not make n number of calls to auth0 to get the default picture.
I’m not sure what your app architecture looks like, but in most cases, Auth0 will pass your app an Access Token (used for making API requests) and an ID Token after authentication. The ID Token will have the user’s picture and other info for your frontend to use.
Depending on which Auth0 SDK you are using, you can retrieve the claims from the user similar to this example from the React SDK: