Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/gotrue/src/GoTrueClient.ts>default#onAuthStateChange

An isomorphic Javascript library for GoTrue.
Latest
method default.prototype.onAuthStateChange
import { default } from "https://deno.land/x/gotrue@3.0.0/src/GoTrueClient.ts";

Receive a notification every time an auth event happens.

Parameters

callback: (event: AuthChangeEvent, session: Session | null) => void

Returns

{ data: Subscription | null; error: ApiError | null; }

A subscription object which can be used to unsubscribe itself.