Login with verification (catpcha / sms / ...)
Unanswered
Black Caiman posted this in #help-forum
Black CaimanOP
Hi,
I'm currently implementing authentification and I'm having issues with the signin flow.
My setup is as followed: client (Next with Next-Auth) -> web server (Next.js) -> Api (Feathers)
Currently, when logging in, if the user is rate-limited, the Api might reply with errors containing a verification process type (sms, captcha, ...)
My issue is the following: How to keep / redirect the user to the signIn page when either of these are caught, so that he can solve the challenge ?
I've tried:
- Throwing and catching the error in order to redirect to the correct page, but the redirect callback is never called when throwing.
- Changing the callback url within authorize (CredentialsProvider), but it was also ignored
Thanks for reading,
Have a nice day !
I'm currently implementing authentification and I'm having issues with the signin flow.
My setup is as followed: client (Next with Next-Auth) -> web server (Next.js) -> Api (Feathers)
Currently, when logging in, if the user is rate-limited, the Api might reply with errors containing a verification process type (sms, captcha, ...)
My issue is the following: How to keep / redirect the user to the signIn page when either of these are caught, so that he can solve the challenge ?
I've tried:
- Throwing and catching the error in order to redirect to the correct page, but the redirect callback is never called when throwing.
- Changing the callback url within authorize (CredentialsProvider), but it was also ignored
Thanks for reading,
Have a nice day !
1 Reply
Black CaimanOP
Currently setting redirect to false and handling the error / redirect myself seems to do the trick, any recommendation ?