https://supertokens.com/ logo
passwordless error
b

blockexplorer

04/24/2023, 10:44 AM
Any ideas on this "RESTART_FLOW_ERROR". Signing up via passwordless and getting internal server error. Nodejs logs gave this error message
r

rp

04/24/2023, 10:45 AM
this means that you need to take the user back to the initial login screen and ask them to re enter their email /phone
b

blockexplorer

04/24/2023, 10:46 AM
But why is it happening? This occurs whenever I am clicking on email confirmation link that I receive in my email
Login screen -> enter email -> receive magic link in email -> click -> internal server error
Also this is only happening for some email IDs and not all
If I enter a gmail id then it works and allows me to proceed, but when I enter a company email id then I get this error. Sometimes happens with gmail ID as well but mostly it works
?
r

rp

04/24/2023, 12:14 PM
hmm.. that's odd. It can also happen if the link was already consumed
are you building your own custom UI?
b

blockexplorer

04/26/2023, 3:00 PM
Let me confirm that but most likely yes
r

rp

04/26/2023, 3:06 PM
if you are using a custom UI, you need to be careful to handle the case wherein the email client can open the link and consume the code. This way, when the user clicks on the email link, it will already have been consumed resulting the error you see. This is mentioned in our docs too: https://supertokens.com/docs/passwordless/custom-ui/login-magic-link#if-on-a-different-device-or-browser
b

blockexplorer

04/26/2023, 5:06 PM
Oh I see
I didn't know that
r

rp

04/26/2023, 5:08 PM
ah. Well, now you do 🙂