Password Change in React

Within my React App, do I allow a user to change their password? Do I redirect them to some auth0 link? I’d like to not have to do any UI stuff on my end but just redirect them to an auth0 page but not sure where or how.

Also how do I know if they are a social auth login? In that case I would hide this feature.

Thanks

Hi @RandomDude1120,

Welcome to the Auth0 Community!

One easy way to do a password reset is to send a Change Password Email. This will send the user an email with a link to change their password. The user will then change their password using the the Auth0 UI. You can create a button for this in your app.

You can determine if the user is a social user by looking at the sub claim in the token. This claim is the user_id, and includes the connection type.

For example:

  • sub/user_id of an Auth0 database connection (username/password) user could be auth0|12345.
    VS.
  • sub/user_id of a Twitter social connection user may be twitter|67890.

Hope this helps!

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