FR (Authenticator): Override function support for ChangePassword
On which framework/platform would you like to see this feature implemented?
Vue
Which UI component is this feature-request for?
Authenticator
Please describe your feature-request in detail.
Currently, the Authenticator component supports override functions for the following actions:[1]
- Auth.signUp | handleSignUp
- Auth.signIn | handleSignIn
- Auth.confirmSignIn | handleConfirmSignIn
- Auth.confirmSignUp | handleConfirmSignUp
- Auth.forgotPassword | handleForgotPassword
- Auth.forgotPasswordSubmit | handleForgotPasswordSubmit
However, it is missing support for other auth events such as changePassword. In our specific case, this has made it challenging to streamline the login experience between a returning user (no change password requirement) and a brand new user logging in for the first time (one who must first statisfy the NEW_PASSWORD_REQUIRED challenge). I believe being able to simply receive the ChangePassword auth event in the same way we can receive the SignIn auth event would allow us to centralize the app entry logic universally.
1: Authenticator customization docs
Please describe a solution you'd like.
No specific implementation preferences; just want to be able to override the changePassword event with the Authenticator component.
(Not sure if duplicate of issue 3418, please close if so)
We love contributors! Is this something you'd be interested in working on?
- [X] 👋 I may be able to implement this feature request.
- [ ] ⚠️ This feature might incur a breaking change.
Hi @irothenbaum! I think you mean forceNewPassword (which happens after sign in and Cognito gives NEW_PASSWORD_REQUIRED to force change password).
I could confirm that API is not overridable:
https://github.com/aws-amplify/amplify-ui/blob/8fe1c7ef80690ac2b415edff3796ceaaf8cfe427/packages/ui/src/machines/authenticator/actors/signIn.ts#L600-L604
we'll keep you updated on this feature request, thanks!
This would be really helpful. Currently I'm hacking away at a solution by using the Hub.listen which isn't great...