Unable to provide ClientMetadata within the required password reset flow #6238
Labels
Authenticator
An issue or a feature-request for an Authenticator UI Component
feature-request
Request a new feature
Before creating a new issue, please confirm:
On which framework/platform are you having an issue?
Angular
Which UI component?
Authenticator
How is your app built?
Angular CLI
What browsers are you seeing the problem on?
Chrome
Which region are you seeing the problem in?
No response
Please describe your bug.
What is working
After importing users to a Cognito pool, the user is in the RESET_PASSWORD state.
When the user tries to sign in, they are sent to the
ConfirmPasswordReset
screen and asked for a code.Cognito then proceeds to send an email with the code.
Unfortunately, it seems that we’re not able to customize this email appropriately.
What is not working
We are localizing emails sent by Cognito through the use of a lambda (https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-custom-message.html).
To pass the appropriate locale, we override some services (
handleSignIn
andhandleForgotPassword
) to provide it through theclientMetdata
dict.Unfortunately, it seems that the
handleForgotPassword
is not called in the case of the “PasswordResetRequired” flow, thus preventing us to pass the appropriate locale.As per our understanding of the workflow,
handleForgotPassword
should be called when sending the email with the password reset code (see above) but this is not the case.Are we overriding the right service? Is there an underlying issue within the angular implementation?
What's the expected behaviour?
The ‘password reset required’ workflow should call the user-overriden service handleForgotPassword , allowing developpers to customize this workflow.
Help us reproduce the bug!
clientMetadata
in thehandleForgotPassword
serviceAWSCognitoIdentityProviderService.ForgotPassword
does not contain the clientMetadataCode Snippet
No response
Console log output
InitiateAuth payload :
ForgotPassword payload :
Additional information and screenshots
Related issue : #2488
The text was updated successfully, but these errors were encountered: