mirror of
https://github.com/supabase/supabase.git
synced 2026-07-06 20:44:21 +08:00
8 lines
284 B
TypeScript
8 lines
284 B
TypeScript
export function doesTokenDataExist() {
|
|
// ignore if server-side
|
|
if (typeof window === 'undefined') return false
|
|
// check tokenData on localstorage
|
|
const tokenData = window?.localStorage['supabase.auth.token']
|
|
return tokenData != undefined && typeof tokenData === 'string'
|
|
}
|