Auth0 Home Blog Docs

Cached user is not refreshed with custom database

custom-database
user-profile

#1

Hi awesome Auth0 and community,

I have a setup where I use custom database (and scripts) to authenticate and return a user profile.

In the Custom Database dashboard when i “try” my scripts, the user is returned with updated values.

When I search for the user in Auth0, these values (e.g. in app_metadata) are not updated. I am aware that Auth0 caches the user. But it states in the documentation that the user will be refreshed each time the user authenticates. (https://auth0.com/docs/user-profile/user-profile-details#caching-of-the-user-profile-in-auth0)

The only way I can force an update through is by deleting the user account - which then will be regenerated upon next authentication and the values are updates. I’d rather not use this approach since it’s will remove stats an etc.

Am I missing something?

Kind regards,
Emrah