Steps to validate user after Force change password

0

Hi team,

I created a new user in my Cognito user pool with AdminCreateUser AP call, the user is added with sates Force change password

then the user will be prompted with an angular front-end page to enter a new password.

I'm confused about which method I can use to confirm the user: adminConfirmSignUp, initiateAuth, adminInitiateAuth, AdminRespondToAuthChallenge or adminSetUserPassword

do the user need the temporary password received by email to signup? or only his new password? i don't see any SDK API that takes the 2 arguments:

1 - temporary password generated b Cognito

2 - the user chooses the new password

my goal is to give the user access, move away from Force change password status, and have a confirmed user who can log in and have an access token.

what are the API calls to do after the user receives the invitation message with a temporary password and gives his new password?

Thank you team for clarification

appreciate any example that helps me continue the process after AdminCreateUser and Force change password

Thank you!!

Jess
질문됨 2년 전4189회 조회
1개 답변
0

Hello,

When the user authenticates (InitiateAuth) using the temporary password, Cognito will respond with a ChallengeName=NEW_PASSWORD_REQUIRED. You then need to use RespondToAuthChallenge to respond to the challenge with NEW_PASSWORD and any required attributes that Amazon Cognito returned in the requiredAttributes parameter.

Please see the ChallengeName Response Elements of InitiateAuth here [1].

[1] https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_InitiateAuth.html#API_InitiateAuth_ResponseElements

AWS
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠