How to update user_metadata from front-end directly

Hi there,

I have an Angular app that uses Auth0 on the front-end to handle authentication and also authenticates some API routes. However, I’m trying to move towards a more serverless architecture so I’d like the front-end to communicate directly with Auth0 when the user manages things like their profile info e.g. the user_metadata object.

I understand the Management API can set the user_metadata properties but that’s only secure on the server, not the front-end (because it would expose app-level credentials) and I’m trying to minimise using servers directly.
So I’d like to know which API endpoint I can use to achieve the setting of the user_metadata in a secure way on the front-end?

Thanks very much.

Hi @hello2,

You are correct that for most Management API endpoints, you must requests server-side. However, there are a few endpoints that you can use from a SPA. You can use the Management API to update user_metadata for the current user from a SPA. The steps are described here:

Let me know if you have additional questions!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.