hi guys! i have problem with email verification. /signup request goes well, but after that /verify r...
a
hi guys! i have problem with email verification. /signup request goes well, but after that /verify returns 401
r
Hey @art1c0
This means that you need to verify the email
a
not sure what you mean. email is not being sent because of this /verify request fails - backend returns 401 with body { "message": "unauthorised" }
and your UI shows me signup form again instead to "verification email sent" screen with "resend" link
r
ah right. ok
Can i see the response headers for the sign in API?
can you show me the whole header?
a
as a screenshot?
or text?
this is full headers for /auth/signup request
r
and the request headers for the /verify request?
which browser are you using?
safari?
a
yes
r
ah i see. So safari deosn't support same site none
you should switch to using header based auth
search in our docs "token transfer method"
a
basically it's Session.init({ tokenTransferMethod: "header" }) ?
r
yea
on the frontend
a
yes it works now! thank you so much! please consider writing this in the docs about Safari
r
it's already there in certain parts + it's only applicable when the api domain and website domain are not in the same base domain - which is rare.
a
it actually happens to me after i deployed backend to the remote server, though it worked locally
r
right yea. so the remote server is on a different domain than the website you loaded causing sameSite to be none - which breaks cookie based login on safari.
a
this is actually weird, according to the docs https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite SameSite=None should work in safari 13 and higher on mac os catalina and higher, but i use safari 16.3 on mac os ventura, which is much higher
r
yeaaaa... just safari things
a
🙂
also maybe you now why front end does not send any requests after /signup (using react custom ui) ? i mean /verify and /token
some misconfiguration maybe.. not sure
r
cause you are supposed to send those requests based on your custom UI flow.
(as mentioned in the docs)
a
oh i will appreciate if you point me to this part of the docs, so i can forward it to out react dev
r
which recipe are you using?
a
ThirdPartyEmailPassword
a
i guess you mean calling sendVerificationEmail() ?
r
yes
a
ok thank you very much!
have a great day!
r
to you as well 🙂