auth.signOut()

Inside a browser context, signOut() will remove extract the logged in user from the browser session and log them out - removing all items from localstorage and then trigger a "SIGNED_OUT" event.

For server-side management, you can disable sessions by passing a JWT through to auth.api.signOut(JWT: string)

const { error } = supabase.auth.signOut()

Examples

Sign out

const { error } = supabase.auth.signOut()