Change email/username react native

I’m looking through the react-native docs here: Auth - Documentation

And it doesn’t look like there is a way to have a user change their email/username and password. I can’t tell if maybe its the .patchUser(), however, that only includes user_metadata and if you follow the link to the base api docs, Auth0 Management API v2, user_metadata is clearly separate from the email field.

In addition, when I try to use the endpoint, I get auth0.auth.patchUser and auth0.users.patchUser is not a function.

Anyone know whats going on with the react-native documentation?

The only user property that you would be able to update from any native (or SPA) application is the user_metadata. This is not a limitation of the React Native SDK, but of the way Management API v2 permissions work: a user can only update their own user_metadata, nothing more.

All the other updatable properties for the user can only be updated with a token obtained through the Client Credentials grant, available only for non-interactive or regular web app clients (i.e. clients that can securely keep a secret). This means that you will have to:

  • Have a backend API for your React Native application that will handle the email/password changes
  • Have your React-Native app invoke your backend API for the requested changes
  • Define a new application type (of type “non-interactive”) representing the backend API. Grant this application permissions to invoke the Auth0 Management API v2 with update:users permission.
  • Have your backend API obtain a token using the client_id and client_secret of the authorized non-interactive application.
  • With that token, have the backend API make a request to Auth0 Management API v2 to update the desired properties.
1 Like

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

We created an FAQ that covers this topic here: