Best way to change a users password with AWS Cognito Hosted UI?

Viewed 1114

We use AWS Cognito with the Host UI for login and signup.

We require a user to be able to change their password.

There is an auth flow state in Cognito called FORCE_CHANGE_PASSWORD. When the user is in this state, upon successful login via Hosted UI, the user is then instructed to change their password before they continue.

The issue is that we cant find a way to force a users state to be FORCE_CHANGE_PASSWORD. We are instead having to use AWS API to change a password.

We chose the Hosted UI option because we wanted to offload auth responsibility from our app. Having to use the AWS API to change a password means we are now pulling in 'auth stuff' into our stack (auth forms, val, api services, testing, ongoing maintenance) which we want to avoid/minimise.

Is there some way to set the users state to FORCE_CHANGE_PASSWORD? As this would keep everything in the Hosted UI, and solve our problem.

We were hoping to find an api method like adminSetUserState??

0 Answers
Related