My understanding is that 'USERNAME': auth_params['USERNAME'], is probably returning 'NONE' instead of the username provided by the user, but I am not sure why that is happening.
Note: pool_id and client_id information purposefully omitted here but it is included in my actual code.
Second Issue:
As you can see in the code above, I have to hard code the new password as one of the arguments for u.change_password() method. I am not sure how to get it to work where the user would be providing their new password information because the app just throws an error before anything else can be done. How do I get the web page to request the new password information from the user?
To reiterate, once the ForceChangePasswordException is reached, how do I get a "Please change your password" page to pop up instead of the error Traceback?
I am building a web application using Python/Flask and I'm trying to get Cognito to work using Warrant. I am running into two issues currently.
First Issue: Below is the code I have when trying to authenticate a user who is logging in for the first time.
When I click "Submit" on the web page, I get this Traceback and error information.
My understanding is that
'USERNAME': auth_params['USERNAME'],
is probably returning 'NONE' instead of the username provided by the user, but I am not sure why that is happening.Note: pool_id and client_id information purposefully omitted here but it is included in my actual code.
Second Issue: As you can see in the code above, I have to hard code the new password as one of the arguments for u.change_password() method. I am not sure how to get it to work where the user would be providing their new password information because the app just throws an error before anything else can be done. How do I get the web page to request the new password information from the user?
To reiterate, once the ForceChangePasswordException is reached, how do I get a "Please change your password" page to pop up instead of the error Traceback?