how can I check for session without async/await on frontend
Copy code
import SuperTokens from 'supertokens-react-native';
async function doesSessionExist() {
if (await SuperTokens.doesSessionExist()) {
// user is logged in
} else {
// user has not logged in yet
}
}
r
rp_st
12/11/2022, 11:56 AM
Hey @aV
rp_st
12/11/2022, 11:56 AM
It’s not possible to check for that without async await on the frontend.
rp_st
12/11/2022, 11:56 AM
It requires reading from storage which is fundamentally an async operation.
SuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).