Open okkonen opened 6 years ago
If using the sample JS, it can be handled like so...
newPasswordRequired: function(userAttributes, requiredAttributes) {
// the api doesn't accept these fields back
delete userAttributes.email_verified;
delete userAttributes.phone_number_verified;
var newpass = prompt("Enter a new password:","");
cognitoUser.completeNewPasswordChallenge(newpass, userAttributes, this);
}
Not sure what you mean. As soon as I call CognitoAuth.getSession() it will redirect to hosted login page:
https://
And when trying to login with the temporary password it redirects to: https://thirdpresence.auth.eu-west-1.amazoncognito.com/error?error=Error%20sending%20message,%20please%20contact%20the%20app%20owner.
I am not getting any callbacks back to my app.
I know that I am able to do the new password challenge if I create my own login UI, but I wanted to use amazon-cognito-auth-js instead of doing all by myself.
I am sorry to disappoint you, but the admin-created users are not allowed for cognito auth, I also struggled with this situation, but it does appear in the docs. This might change in the future though.
Support for admin created users is on our roadmap indeed. I cannot comment on a timeline however.
I actually tried to pull out the link with the note about this on the docs, but I was unable to find it. Could this be that it got deleted on the migration from beta to prod? I also had to re-upload the logo for the UI when this upgrade happened.
@rcfrias you shouldn't have to re-upload your logo. Can you please send me a Private Message on the Amazon Cognito Forums with your user pool id?
@rachitdhall sent, although the user "rachitdhall" does not exist at aws, I used rachit instead and went through.
Hi,
We had added support for the requested flow.
The sign in fails if an user is created by admin and the user status is FORCE_CHANGE_PASSWORD.
Would like to allow admin to created users as well.