sharma8471
08/05/2022, 4:40 AMsuperTokensPasswordless.createCode({ email: "john@example.org" })
2. Now either they will type in the code in a form I provide or they will visit the email link.
If they visit the link, I will get their code like this const userInputCode = superTokensPasswordless.getLinkCodeFromURL()
3. Then I will verify the code - superTokensPasswordless.consumeCode({ userInputCode: "8465AWETA" }).then((res) => { if(res.createdUser){ console.log(JSON.stringify(res.user))} })
Session should be automatically set now
Am I missing anything?rp_st
08/05/2022, 4:44 AMrp_st
08/05/2022, 4:44 AMnkshah2
08/05/2022, 4:46 AMsharma8471
08/05/2022, 5:28 AMsupertokensPasswordless is not defined
Getting this error.
I have already imported the necessary packages both with tag @0.1.3
and without it
<script src="https://cdn.jsdelivr.net/gh/supertokens/supertokens-web-js/bundle/website.js"></script>
<script src="https://cdn.jsdelivr.net/gh/supertokens/supertokens-web-js/bundle/supertokens.js"></script>
<script src="https://cdn.jsdelivr.net/gh/supertokens/supertokens-web-js/bundle/session.js"></script>
<script src="https://cdn.jsdelivr.net/gh/supertokens/supertokens-web-js/bundle/emailpassword.js"></script>
nkshah2
08/05/2022, 5:29 AMsharma8471
08/05/2022, 5:30 AMnkshah2
08/05/2022, 5:31 AM<script src="https://cdn.jsdelivr.net/gh/supertokens/supertokens-web-js/bundle/website.js"></script>
to
<script src="https://cdn.jsdelivr.net/gh/supertokens/supertokens-web-js/bundle/website.js"></script>
<script src="https://cdn.jsdelivr.net/gh/supertokens/supertokens-web-js/bundle/passwordless.js"></script>
nkshah2
08/05/2022, 5:33 AMwebsite
and passwordless
scriptssharma8471
08/05/2022, 5:43 AMsharma8471
08/05/2022, 5:43 AMsharma8471
08/05/2022, 5:44 AMnkshah2
08/05/2022, 5:44 AMnkshah2
08/05/2022, 5:45 AMsharma8471
08/05/2022, 5:49 AMnkshah2
08/05/2022, 5:52 AM/auth/verify
is the link you receive in the email. This is something your frontend needs to handlenkshah2
08/05/2022, 5:52 AMsharma8471
08/05/2022, 5:58 AMnkshah2
08/05/2022, 5:59 AMsharma8471
08/05/2022, 6:00 AMnkshah2
08/05/2022, 6:01 AMsharma8471
08/05/2022, 6:01 AM{"status":"RESTART_FLOW_ERROR"}
sharma8471
08/05/2022, 6:01 AMnkshah2
08/05/2022, 6:01 AMsharma8471
08/05/2022, 6:07 AMsharma8471
08/05/2022, 6:12 AMsharma8471
08/05/2022, 6:12 AMnkshah2
08/05/2022, 8:30 AMnkshah2
08/05/2022, 8:30 AM