Password Reset PKCE Flow
Hello, I am trying to implement the password reset flow using PKCE. On the docs it is telling me that a PASSWORD_RECOVERY event will be fired after the link in the email is clicked. I am using NextJS.
The following is the link that I receive in my email. Localhost is fine as this is just to test out the implementation. I will change it once it works.
http://localhost:3000/api/auth/confirm?token_hash=pkce_538c4e094001134acb8544e6743ad91390b3acde5955123854abcf3f&type=recovery
I checked that the type is correct by printing it out on the /api/auth/confirm endpoint and it is correctly set as "recovery". But, after calling the verifyOTP function with the received token_hash and type only a SIGNED_IN event gets fired. I am trying to use the events to change the page into a form where it accepts the new password the user is trying to set.
The following is the link that I receive in my email. Localhost is fine as this is just to test out the implementation. I will change it once it works.
http://localhost:3000/api/auth/confirm?token_hash=pkce_538c4e094001134acb8544e6743ad91390b3acde5955123854abcf3f&type=recovery
I checked that the type is correct by printing it out on the /api/auth/confirm endpoint and it is correctly set as "recovery". But, after calling the verifyOTP function with the received token_hash and type only a SIGNED_IN event gets fired. I am trying to use the events to change the page into a form where it accepts the new password the user is trying to set.