gitcommitshow
04/27/2022, 5:07 AMonHandleEvent
for supertokens-website
. Here's what I did
1. I logged out the user using await supertokens.signOut();
2. I added onHandleEvent
as following
supertokens.init({
apiDomain: "...",
onHandleEvent: (context) => {
if (context.action === "UNAUTHORISED") {
alert("You are not logged in");
if (context.sessionExpiredOrRevoked) {
console.log("Session expired or revoked")
}
}
}
})
But I don't see any alert or console logrp
04/27/2022, 5:09 AM