aarron28_
02/17/2023, 10:28 AMrp_st
02/17/2023, 10:30 AMaarron28_
02/17/2023, 10:32 AMrp_st
02/17/2023, 10:33 AMsupertokensEmailPassword.signIn
work fine?aarron28_
02/17/2023, 10:33 AMaarron28_
02/17/2023, 10:33 AMaarron28_
02/17/2023, 10:33 AMaarron28_
02/17/2023, 10:33 AMrp_st
02/17/2023, 10:34 AMsupertokensSession.doesSessionExist()
aarron28_
02/17/2023, 10:34 AMrp_st
02/17/2023, 10:35 AMaarron28_
02/17/2023, 10:36 AMnkshah2
02/17/2023, 10:45 AMsession_provider
function gets called on page load for all pages you are using supertokens in?
Heres my code:
html
<html>
<head>
<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>
</head>
<body>
<script>
supertokens.init({
appInfo: {
apiDomain: "http://localhost:3001",
apiBasePath: "/auth",
appName: "Test",
},
recipeList: [
supertokensSession.init({
tokenTransferMethod: "header"
}),
supertokensEmailPassword.init(),
],
});
async function doesSessionExist() {
console.log(await supertokensSession.doesSessionExist())
}
</script>
<button onclick="doesSessionExist()">Check session</button>
</body>
</html>
aarron28_
02/20/2023, 2:26 AMnkshah2
02/20/2023, 2:56 AMaarron28_
02/20/2023, 3:26 AMnkshah2
02/20/2023, 3:29 AMaarron28_
02/20/2023, 3:30 AMnkshah2
02/20/2023, 3:34 AMaarron28_
02/20/2023, 3:36 AMnkshah2
02/20/2023, 3:37 AMaarron28_
02/20/2023, 3:46 AMnkshah2
02/20/2023, 5:40 AMaarron28_
02/20/2023, 5:49 AMnkshah2
02/20/2023, 5:50 AMaarron28_
02/20/2023, 6:15 AMnkshah2
02/20/2023, 6:45 AMaarron28_
02/20/2023, 6:49 AMnkshah2
02/20/2023, 6:51 AMaarron28_
02/20/2023, 6:57 AMnkshah2
02/20/2023, 6:57 AMaarron28_
02/20/2023, 7:17 AMaarron28_
02/20/2023, 7:20 AMnkshah2
02/20/2023, 7:35 AMaarron28_
02/20/2023, 7:47 AMnkshah2
02/21/2023, 6:01 AMaarron28_
02/21/2023, 6:22 AMnkshah2
02/21/2023, 6:22 AM