Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

AuthRefreshDiscardedError

import { AuthRefreshDiscardedError } from "https://esm.sh/@supabase/supabase-js@2.108.1/dist/index.d.mts";

Returned when the server rotated a refresh token successfully but the client chose not to persist the rotated tokens because the local session changed mid-flight. Usually means a concurrent signOut cleared storage between when the refresh started and when it came back.

Set on the error field of the refresh result so callers can tell "we got rotated tokens but threw them away" apart from "the refresh failed." The rotated session on the server will be picked up on the next refresh via GoTrue's parent-of-active path.

@example
import { isAuthRefreshDiscardedError } from '@supabase/auth-js'

if (isAuthRefreshDiscardedError(error)) {
  // Concurrent signOut/sign-in raced our refresh. Treat as a no-op.
}
class AuthRefreshDiscardedError extends CustomAuthError {
constructor(message?: string);
}

§Extends

§
CustomAuthError
[src]

§Constructors

§
new AuthRefreshDiscardedError(message?: string)
[src]