Luc
04/24/2022, 11:02 AMonAuthStateChanged
. Supabase also provides the same function but when I refresh the page, it doesnt log `authenticated`(for example).
ts
const onStartup = async () => {
try {
console.log(client.auth.session())
client.auth.onAuthStateChange((event, session) => {
if (event == "SIGNED_IN") {
return console.log("SIGNED_IN", session)
}
console.log("nione", session)
})
} catch (error) {
console.log(error)
}
}
How can I keep user logged in, even if i refresh the page?Luc
04/24/2022, 11:03 AMLuc
04/24/2022, 11:03 AM