auth.onAuthStateChange()

Receive a notification every time an auth event happens.

supabase.auth.onAuthStateChange((event, session) => {
console.log(event, session)
})

Parameters

  • callbackrequiredobject

    No description provided.

Examples

Listen to auth changes

supabase.auth.onAuthStateChange((event, session) => {
console.log(event, session)
})