Is there any way to listen to the forget password event in gen 2 amplify? It’s causing a weird infinite loop in my code because I have no listener for the action that just happened. I’m using signInWithRedirec
t with Cognito Hosted UI.
I’m using React 18.2.0 and aws-amplify 6.5.3.
Hub.listen('auth', async ({ payload }) => {
switch (payload.event) {
case 'signedIn':
break;
case 'signedOut':
case 'tokenRefresh_failure':
case 'signInWithRedirect_failure':
break;
case 'forgotPassword':
//How to capture this?
break;
default:
break;
}
});