Closed mdesousa closed 1 month ago
the user is left in a FORCE_CHANGE_PASSWORD state which blocks other things
What does that block actually? Honest question. As far as I know that state is a fine state to be in and does not prevent signing in with custom auth flows.
good question! it was giving us an error while trying to confirm the user. our goal was to verify the user's email and phone, and recently changed our code to use VerifyUserAttribute
instead. just tested this function with a user in FORCE_CHANGE_PASSWORD
and didn't face any issues. so maybe we'll leave users in that state instead of forcing a permanent password... thanks for the reply!
another related issue: when we try to sign-up in the front end, the cognito SignUp API requires a password... without it we get a 1 validation error detected: Value at 'password' failed to satisfy constraint: Member must not be null
just wondering how people typically deal with this... you wouldn't need it with passwordless sign-in. thanks!
Afraid the answers is pretty pragmatic and you've considered this no doubt: generate a random password, eg on the frontend side where you call the signup API from. May be as simple as using a uuid4 (depending on password policy though). If you don't allow SRP / username password login on any of your user pool app clients, users cannot sign in with a password (even if they would know the randomly generated one).
thanks @ottokruse ! i found an example in #92 which was useful, and for random password generation this is a good library that is easy to configure to match the password policy.
Hi, wondering if there is any advice on how to setup the sign-up experience with cognito when we intend to implement the passwordless sign-in. Some issues that we are running into:
AdminCreateUser
, the user is left in aFORCE_CHANGE_PASSWORD
state which blocks other things. we had to update the user immediate after being created with a permanent password (AdminSetUserPassword
) to switch it toCONFIRMED
. is this the best approach?VerifyUserAttribute
for this... but don't seen an equivalentAdminVerifyUserAttribute
that can be invoked in the backend (without an access token). any suggestions on how to handle this?thanks for any help!