Amplify-js: [Question] completeNewPassword/changePassword different?

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

Hi guys,

I wonder what is different between two methods completeNewPassword and changePassword in aws-amplify. Because when I custom UI change password for first time login, I have using method changePassword but it have error: Local storage is missing an ID Token, Please authenticate
https://github.com/aws/aws-amplify/blob/0124c02cdccfbea5064c1b81cc403fe3b68c6383/packages/amazon-cognito-identity-js/src/CognitoUser.js#L1132

Look like when we not login success, we can't get idTokenKey as above?

On my opinion:
completeNewPassword: using when we login the first time to app
changePassword: using when we signed in to app, so we can get idTokenKey

Please help me more clear here.
Thanks

Auth question

Most helpful comment

@tuanluu-agilityio from my understanding:
completeNewPassoword is when the admin assigned an account to the user and then the user logged into the app in the first time.
changePassword is used for the current user to change his password which can only be used when the user logged in.

All 2 comments

@tuanluu-agilityio from my understanding:
completeNewPassoword is when the admin assigned an account to the user and then the user logged into the app in the first time.
changePassword is used for the current user to change his password which can only be used when the user logged in.

@tuanluu-agilityio please feel free to reopen this issue if needed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lucasmike picture lucasmike  路  3Comments

cgarvis picture cgarvis  路  3Comments

rygo6 picture rygo6  路  3Comments

ldgarcia picture ldgarcia  路  3Comments

shinnapatthesix picture shinnapatthesix  路  3Comments