Gravatar Usage with Auth0

Problem statement

When attempting to build a Content-Security-Policy (CSP) for an application, it was noticed that the Gravatar service often supplies the user image in Auth0. However, simply adding 'https://*’; to the img-src in the policy does not appear to suffice because, at times, these icons are served from 'https://*’;. After researching further, it appears that if no icon exists on Gravatar, there is a redirection to the following Auth0-related endpoint '';.

Is there any Auth0 documentation to help understand how Auth0 and Gravatar interact to add icons for user profiles?


Auth0 automatically adds Gravatar URLs as the profile picture if there is no existing picture URL for the user. Since many users will not have Gravatar images, Auth0 embeds a fallback image URL in (*).

When Gravatar falls back to that image, it redirects to * This is actually an implementation detail of Gravatar and Auth0 cannot guarantee that this will not change in the future. Gravatar is owned by the same company as WordPress and they control both the * and * domains.

Adding the two domains (* * to the Content Security Policy (CSP) should work, but this is not something Auth0 can officially guarantee to be future-proof, unfortunately.

Keep in mind that the above will only apply to Auth0 connection types such as database and passwordless only. If using a social or enterprise Identity Provider, they may send their own picture attributes which will be hosted in other domains.