@auth0/nextjs-auth0 - v4.32.1
    Preparing search index...

    Interface AnonymousSessionConfig

    Config block for auth0.ts setup

    interface AnonymousSessionConfig {
        audience?: string;
        clearAnonymousSessionOnLogin?: boolean;
        cookie?: {
            maxAge?: number;
            name?: string;
            sameSite?: "none" | "lax" | "strict";
            secure?: boolean;
        };
        enabled: boolean;
        scope?: string;
    }
    Index
    audience?: string

    Audience requested for the anonymous access token. When omitted the authorization server applies the tenant default. The resource server must allow anonymous access, otherwise the server reports invalid_target.

    clearAnonymousSessionOnLogin?: boolean

    When true (default), the local auth0_anon cookie is deleted after a successful login callback, once the authenticated session is established. Abandoned logins leave the cookie intact. Clears local (app-domain) cookie only; the tenant-domain auth0_anon cookie is not affected (server-to-server cannot forward the browser cookie to clear it — accepted gap for EA).

    cookie?: {
        maxAge?: number;
        name?: string;
        sameSite?: "none" | "lax" | "strict";
        secure?: boolean;
    }

    Type Declaration

    • OptionalmaxAge?: number

      Cookie max age in seconds. Defaults to 2592000 (30 days).

    • Optionalname?: string

      Cookie name. Defaults to "auth0_anon"

    • OptionalsameSite?: "none" | "lax" | "strict"

      SameSite attribute. Defaults to "lax"

    • Optionalsecure?: boolean

      Secure flag. Defaults to true

    enabled: boolean

    Master switch. Defaults to false: routes not mounted, methods no-op

    scope?: string

    Space-separated scopes requested for the anonymous access token. When omitted the authorization server applies the tenant default. Scopes that are not granted to anonymous subjects are reported as invalid_scope.