C#: SignOutReason

Tells why the user was signed out. Read it while handling AuthState.SignedOut.

Examples

Show a notice when the session expires

supabase.Auth.AddStateChangedListener((sender, changed) =>
{
    if (changed == AuthState.SignedOut && sender.SignOutReason == SignOutReason.SessionExpired)
    {
        ShowSessionExpiredNotice();
    }
});