Amplify-js: Add functionality to change the current password for an authenticated user

Created on 8 Feb 2018  路  2Comments  路  Source: aws-amplify/amplify-js

Hi guys,

For our app we need a possibility to change the password for signed in users.

As I see there is available method on cognito-identity-js to change the current password for an authenticated users but I cannot find according method on Auth class

Please let me know if you plan to implement this method in future releases.
Thanks

Most helpful comment

@elorzafe thanks for explanation but we need slightly different flow where user inputs old password and new password/confirm password then clicks 'Change my password' and it gets changed without any confirmations etc. Let me talk to my team and see if we can reuse already existing change password flow within our app :)

All 2 comments

Hi @yuyokk

You can change the user password. The flow is this:

  • First you need to call forgotPassword(username: string) this will send and MFA code to the user
  • Then you can call
    forgotPasswordSubmit(
    username: string,
    code: string,
    password: string
    )
    code is given by the user after receives the MFA code the same way is used on signin and signup

If you have any concerns please let me know
Thanks

@elorzafe thanks for explanation but we need slightly different flow where user inputs old password and new password/confirm password then clicks 'Change my password' and it gets changed without any confirmations etc. Let me talk to my team and see if we can reuse already existing change password flow within our app :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

romainquellec picture romainquellec  路  3Comments

callmekatootie picture callmekatootie  路  3Comments

josoroma picture josoroma  路  3Comments

rygo6 picture rygo6  路  3Comments

DougWoodCDS picture DougWoodCDS  路  3Comments