I don't think I'm getting it, 1. Frontend generate...
# support-questions
f
I don't think I'm getting it, 1. Frontend generates a new code with POST
/auth/signinup/code
2. Backend sends email to user -> URL contains preAuthSessionId andlinkCode Are these two steps correct? If yes, what is the user supposed to do with the email?
n
@User Can add more detail here, but the general idea is that the email will contain the
urlWithLinkCode
to login the user. The user would click on the link which would open the
/verify
route on your frontend (this route is added by the SuperTokens frontend SDK when you initialise the Passwordless recipe) The SDK then uses the query and such to continue with the flow
p
Exactly.
f
Here I'm stuck: 1. https://app.swaggerhub.com/apis/supertokens/FDI/1.13.0 - Which /verify endpoint are you referring to? Cause I had to implement it myself 2. I'm not sure I would be able to get the linkCode param. Being separated by "#" I think the browser takes it as a fragment. - https://github.com/expressjs/express/issues/1083 - https://prnt.sc/y2bFOxU5saiO - https://prnt.sc/_hyOG2VXa_ek - https://prnt.sc/-9UNZt3QX0dY
p
1. This is not on the FDI, this is a route on the frontend. Whatever page this link opens is supposed to parse the queryparam and the fragment and make a request to /auth/signinup/code/consume
2. You are not supposed to be handling this url on the backend. The linkCode is intentionally added as a fragment, # is not a separator in this sense. This is intended to be consumed by the browser.
f
that makes sense, thank you so much
p
happy to help 🙂
2 Views