diff --git a/.version b/.version index 7422eeba2..dfe33e04b 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -v4.5.0 \ No newline at end of file +v4.5.1 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 14175e868..b4ca73d2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## [v4.5.1](https://github.com/auth0/nextjs-auth0/tree/v4.5.1) (2025-04-29) +[Full Changelog](https://github.com/auth0/nextjs-auth0/compare/v4.5.0...v4.5.1) + +**Security** +- fix: Ensure JWE expires as expected [\#2040](https://github.com/auth0/nextjs-auth0/pull/2040) ([frederikprijck](https://github.com/frederikprijck)) + ## [v4.5.0](https://github.com/auth0/nextjs-auth0/tree/v4.5.0) (2025-04-25) [Full Changelog](https://github.com/auth0/nextjs-auth0/compare/v4.4.2...v4.5.0) diff --git a/docs/classes/errors.AccessTokenError.html b/docs/classes/errors.AccessTokenError.html index 60368ec9a..fcfd24972 100644 --- a/docs/classes/errors.AccessTokenError.html +++ b/docs/classes/errors.AccessTokenError.html @@ -1,3 +1,3 @@ -AccessTokenError | @auth0/nextjs-auth0 - v4.5.0

Hierarchy (View Summary)

Constructors

constructor +AccessTokenError | @auth0/nextjs-auth0 - v4.5.1

Hierarchy (View Summary)

Constructors

Properties

Constructors

Properties

code: string
+

Constructors

Properties

code: string
diff --git a/docs/classes/errors.AccessTokenForConnectionError.html b/docs/classes/errors.AccessTokenForConnectionError.html index 82168c090..90402e5b3 100644 --- a/docs/classes/errors.AccessTokenForConnectionError.html +++ b/docs/classes/errors.AccessTokenForConnectionError.html @@ -1,11 +1,11 @@ -AccessTokenForConnectionError | @auth0/nextjs-auth0 - v4.5.0

Error class representing an access token for connection error. +AccessTokenForConnectionError | @auth0/nextjs-auth0 - v4.5.1

Error class representing an access token for connection error. Extends the SdkError class.

-

Hierarchy (View Summary)

Constructors

Hierarchy (View Summary)

Constructors

Properties

Constructors

Properties

cause?: OAuth2Error
code: string

The error code associated with the access token error.

-
+

Returns AccessTokenForConnectionError

Properties

cause?: OAuth2Error
code: string

The error code associated with the access token error.

+
diff --git a/docs/classes/errors.AuthorizationCodeGrantError.html b/docs/classes/errors.AuthorizationCodeGrantError.html index 3c2fd5147..d0c7ebb1b 100644 --- a/docs/classes/errors.AuthorizationCodeGrantError.html +++ b/docs/classes/errors.AuthorizationCodeGrantError.html @@ -1,4 +1,4 @@ -AuthorizationCodeGrantError | @auth0/nextjs-auth0 - v4.5.0

Hierarchy (View Summary)

Constructors

constructor +AuthorizationCodeGrantError | @auth0/nextjs-auth0 - v4.5.1

Hierarchy (View Summary)

Constructors

Properties

Constructors

Properties

code: string = "authorization_code_grant_error"
+

Constructors

Properties

code: string = "authorization_code_grant_error"
diff --git a/docs/classes/errors.AuthorizationError.html b/docs/classes/errors.AuthorizationError.html index bc0fc96fe..6d9498ceb 100644 --- a/docs/classes/errors.AuthorizationError.html +++ b/docs/classes/errors.AuthorizationError.html @@ -1,4 +1,4 @@ -AuthorizationError | @auth0/nextjs-auth0 - v4.5.0

Hierarchy (View Summary)

Constructors

constructor +AuthorizationError | @auth0/nextjs-auth0 - v4.5.1

Hierarchy (View Summary)

Constructors

Properties

Constructors

Properties

code: string = "authorization_error"
+

Constructors

Properties

code: string = "authorization_error"
diff --git a/docs/classes/errors.BackchannelLogoutError.html b/docs/classes/errors.BackchannelLogoutError.html index a78c85f78..c93857364 100644 --- a/docs/classes/errors.BackchannelLogoutError.html +++ b/docs/classes/errors.BackchannelLogoutError.html @@ -1,3 +1,3 @@ -BackchannelLogoutError | @auth0/nextjs-auth0 - v4.5.0

Hierarchy (View Summary)

Constructors

constructor +BackchannelLogoutError | @auth0/nextjs-auth0 - v4.5.1

Hierarchy (View Summary)

Constructors

Properties

Constructors

Properties

code: string = "backchannel_logout_error"
+

Constructors

Properties

code: string = "backchannel_logout_error"
diff --git a/docs/classes/errors.DiscoveryError.html b/docs/classes/errors.DiscoveryError.html index e8ac47b6b..97adec63d 100644 --- a/docs/classes/errors.DiscoveryError.html +++ b/docs/classes/errors.DiscoveryError.html @@ -1,3 +1,3 @@ -DiscoveryError | @auth0/nextjs-auth0 - v4.5.0

Hierarchy (View Summary)

Constructors

constructor +DiscoveryError | @auth0/nextjs-auth0 - v4.5.1

Hierarchy (View Summary)

Constructors

Properties

Constructors

Properties

code: string = "discovery_error"
+

Constructors

Properties

code: string = "discovery_error"
diff --git a/docs/classes/errors.InvalidStateError.html b/docs/classes/errors.InvalidStateError.html index 6e4885f7a..be0580242 100644 --- a/docs/classes/errors.InvalidStateError.html +++ b/docs/classes/errors.InvalidStateError.html @@ -1,3 +1,3 @@ -InvalidStateError | @auth0/nextjs-auth0 - v4.5.0

Hierarchy (View Summary)

Constructors

constructor +InvalidStateError | @auth0/nextjs-auth0 - v4.5.1

Hierarchy (View Summary)

Constructors

Properties

Constructors

Properties

code: string = "invalid_state"
+

Constructors

Properties

code: string = "invalid_state"
diff --git a/docs/classes/errors.MissingStateError.html b/docs/classes/errors.MissingStateError.html index 05999a018..b71625565 100644 --- a/docs/classes/errors.MissingStateError.html +++ b/docs/classes/errors.MissingStateError.html @@ -1,3 +1,3 @@ -MissingStateError | @auth0/nextjs-auth0 - v4.5.0

Hierarchy (View Summary)

Constructors

constructor +MissingStateError | @auth0/nextjs-auth0 - v4.5.1

Hierarchy (View Summary)

Constructors

Properties

Constructors

Properties

code: string = "missing_state"
+

Constructors

Properties

code: string = "missing_state"
diff --git a/docs/classes/errors.OAuth2Error.html b/docs/classes/errors.OAuth2Error.html index d57e6957e..47a461da9 100644 --- a/docs/classes/errors.OAuth2Error.html +++ b/docs/classes/errors.OAuth2Error.html @@ -1,5 +1,5 @@ -OAuth2Error | @auth0/nextjs-auth0 - v4.5.0

Errors that come from Auth0 in the redirect_uri callback may contain reflected user input via the OpenID Connect error and error_description query parameter. +OAuth2Error | @auth0/nextjs-auth0 - v4.5.1

Errors that come from Auth0 in the redirect_uri callback may contain reflected user input via the OpenID Connect error and error_description query parameter. You should not render the error message, or error and error_description properties without properly escaping them first.

-

Hierarchy (View Summary)

Constructors

Hierarchy (View Summary)

Constructors

Properties

Constructors

Properties

code: string
+

Constructors

Properties

code: string
diff --git a/docs/classes/errors.SdkError.html b/docs/classes/errors.SdkError.html index 1c98954d1..0bf8a14f3 100644 --- a/docs/classes/errors.SdkError.html +++ b/docs/classes/errors.SdkError.html @@ -1,3 +1,3 @@ -SdkError | @auth0/nextjs-auth0 - v4.5.0

Class SdkErrorAbstract

Hierarchy (View Summary)

Constructors

constructor +SdkError | @auth0/nextjs-auth0 - v4.5.1

Class SdkErrorAbstract

Hierarchy (View Summary)

Constructors

Properties

Constructors

  • Parameters

    • Optionalmessage: string

    Returns SdkError

Properties

code: string
+

Constructors

  • Parameters

    • Optionalmessage: string

    Returns SdkError

Properties

code: string
diff --git a/docs/classes/server.AbstractSessionStore.html b/docs/classes/server.AbstractSessionStore.html index b6ed21557..fb1215922 100644 --- a/docs/classes/server.AbstractSessionStore.html +++ b/docs/classes/server.AbstractSessionStore.html @@ -1,4 +1,4 @@ -AbstractSessionStore | @auth0/nextjs-auth0 - v4.5.0

Class AbstractSessionStoreAbstract

Constructors

constructor +AbstractSessionStore | @auth0/nextjs-auth0 - v4.5.1

Class AbstractSessionStoreAbstract

Constructors

Properties

Constructors

Properties

cookieConfig: CookieOptions
secret: string
sessionCookieName: string

Methods

  • calculateMaxAge calculates the max age of the session based on createdAt and the rolling and absolute durations.

    -

    Parameters

    • createdAt: number

    Returns number

  • save adds the encrypted session cookie as a Set-Cookie header. If the iat property +

Constructors

Properties

cookieConfig: CookieOptions
secret: string
sessionCookieName: string

Methods

  • calculateMaxAge calculates the max age of the session based on createdAt and the rolling and absolute durations.

    +

    Parameters

    • createdAt: number

    Returns number

+

Parameters

Returns Promise<void>

diff --git a/docs/classes/server.Auth0Client.html b/docs/classes/server.Auth0Client.html index de585cb1f..8adbbc52a 100644 --- a/docs/classes/server.Auth0Client.html +++ b/docs/classes/server.Auth0Client.html @@ -1,31 +1,31 @@ -Auth0Client | @auth0/nextjs-auth0 - v4.5.0

Constructors

constructor +Auth0Client | @auth0/nextjs-auth0 - v4.5.1

Constructors

Methods

  • Parameters

    • Optionaloptions: GetAccessTokenOptions

      Optional configuration for getting the access token.

      +

Constructors

Methods

  • Parameters

    • Optionaloptions: GetAccessTokenOptions

      Optional configuration for getting the access token.

      • refresh

        Force a refresh of the access token.

        -

    Returns Promise<{ expiresAt: number; scope?: string; token: string }>

  • getAccessToken returns the access token.

    +

Returns Promise<{ expiresAt: number; scope?: string; token: string }>

  • getAccessToken returns the access token.

    This method can be used in middleware and getServerSideProps, API routes in the Pages Router.

    Parameters

    • req: NextRequest | PagesRouterRequest

      The request object.

    • res: NextResponse<unknown> | PagesRouterResponse

      The response object.

    • Optionaloptions: GetAccessTokenOptions

      Optional configuration for getting the access token.

      • refresh

        Force a refresh of the access token.

        -

    Returns Promise<{ expiresAt: number; scope?: string; token: string }>

  • Returns Promise<{ expiresAt: number; scope?: string; token: string }>

    +

    Parameters

    Returns Promise<void>

    diff --git a/docs/classes/server.AuthClient.html b/docs/classes/server.AuthClient.html index dae8d62b3..7a36a68a4 100644 --- a/docs/classes/server.AuthClient.html +++ b/docs/classes/server.AuthClient.html @@ -1,4 +1,4 @@ -AuthClient | @auth0/nextjs-auth0 - v4.5.0

    Constructors

    constructor +AuthClient | @auth0/nextjs-auth0 - v4.5.1

    Constructors

    Methods

    Constructors

    Methods

    • Exchanges a refresh token for an access token for a connection.

      This method performs a token exchange using the provided refresh token and connection details. It first checks if the refresh token is present in the tokenSet. If not, it returns an error. Then, it constructs the necessary parameters for the token exchange request and performs @@ -19,6 +19,6 @@ The second element is either null if an error occurred, or a ConnectionTokenSet object containing the access token, expiration time, and scope if the request was successful.

      If the refresh token is missing or if there is an error during the token exchange process.

      -
    +

    Parameters

    Returns Promise<[SdkError, null] | [null, TokenSet]>

    diff --git a/docs/classes/server.TransactionStore.html b/docs/classes/server.TransactionStore.html index 66d378912..f6856c031 100644 --- a/docs/classes/server.TransactionStore.html +++ b/docs/classes/server.TransactionStore.html @@ -1,8 +1,8 @@ -TransactionStore | @auth0/nextjs-auth0 - v4.5.0

    TransactionStore is responsible for storing the state required to successfully complete +TransactionStore | @auth0/nextjs-auth0 - v4.5.1

    TransactionStore is responsible for storing the state required to successfully complete an authentication transaction. The store relies on encrypted, stateless cookies to store the transaction state.

    -

    Constructors

    Constructors

    Methods

    Constructors

    Methods

    • Parameters

      • resCookies: ResponseCookies
      • state: string

      Returns Promise<void>

    +

    Constructors

    Methods

    • Parameters

      • resCookies: ResponseCookies
      • state: string

      Returns Promise<void>

    diff --git a/docs/enums/errors.AccessTokenErrorCode.html b/docs/enums/errors.AccessTokenErrorCode.html index 42ad41bfa..45d2aea10 100644 --- a/docs/enums/errors.AccessTokenErrorCode.html +++ b/docs/enums/errors.AccessTokenErrorCode.html @@ -1,4 +1,4 @@ -AccessTokenErrorCode | @auth0/nextjs-auth0 - v4.5.0

    Enumeration AccessTokenErrorCode

    Enumeration Members

    FAILED_TO_REFRESH_TOKEN +AccessTokenErrorCode | @auth0/nextjs-auth0 - v4.5.1

    Enumeration AccessTokenErrorCode

    Enumeration Members

    FAILED_TO_REFRESH_TOKEN: "failed_to_refresh_token"
    MISSING_REFRESH_TOKEN: "missing_refresh_token"
    MISSING_SESSION: "missing_session"
    +

    Enumeration Members

    FAILED_TO_REFRESH_TOKEN: "failed_to_refresh_token"
    MISSING_REFRESH_TOKEN: "missing_refresh_token"
    MISSING_SESSION: "missing_session"
    diff --git a/docs/enums/errors.AccessTokenForConnectionErrorCode.html b/docs/enums/errors.AccessTokenForConnectionErrorCode.html index 26891cc85..ac0caf8cc 100644 --- a/docs/enums/errors.AccessTokenForConnectionErrorCode.html +++ b/docs/enums/errors.AccessTokenForConnectionErrorCode.html @@ -1,8 +1,8 @@ -AccessTokenForConnectionErrorCode | @auth0/nextjs-auth0 - v4.5.0

    Enumeration AccessTokenForConnectionErrorCode

    Enum representing error codes related to access tokens for connections.

    -

    Enumeration Members

    FAILED_TO_EXCHANGE +AccessTokenForConnectionErrorCode | @auth0/nextjs-auth0 - v4.5.1

    Enumeration AccessTokenForConnectionErrorCode

    Enum representing error codes related to access tokens for connections.

    +

    Enumeration Members

    FAILED_TO_EXCHANGE: "failed_to_exchange_refresh_token"

    Failed to exchange the refresh token.

    -
    MISSING_REFRESH_TOKEN: "missing_refresh_token"

    The refresh token is missing.

    -
    MISSING_SESSION: "missing_session"

    The session is missing.

    -
    +
    MISSING_REFRESH_TOKEN: "missing_refresh_token"

    The refresh token is missing.

    +
    MISSING_SESSION: "missing_session"

    The session is missing.

    +
    diff --git a/docs/functions/client.Auth0Provider.html b/docs/functions/client.Auth0Provider.html index f3b3093be..d1d1838ec 100644 --- a/docs/functions/client.Auth0Provider.html +++ b/docs/functions/client.Auth0Provider.html @@ -1 +1 @@ -Auth0Provider | @auth0/nextjs-auth0 - v4.5.0
    +Auth0Provider | @auth0/nextjs-auth0 - v4.5.1
    diff --git a/docs/functions/client.getAccessToken.html b/docs/functions/client.getAccessToken.html index f1c43e3ca..c909bb644 100644 --- a/docs/functions/client.getAccessToken.html +++ b/docs/functions/client.getAccessToken.html @@ -1 +1 @@ -getAccessToken | @auth0/nextjs-auth0 - v4.5.0
    +getAccessToken | @auth0/nextjs-auth0 - v4.5.1
    diff --git a/docs/functions/client.useUser.html b/docs/functions/client.useUser.html index 6f0196be4..9b22e1a7d 100644 --- a/docs/functions/client.useUser.html +++ b/docs/functions/client.useUser.html @@ -1 +1 @@ -useUser | @auth0/nextjs-auth0 - v4.5.0
    • Returns
          | {
              error: Error;
              invalidate: () => Promise<undefined | User>;
              isLoading: boolean;
              user: null;
          }
          | {
              error: null;
              invalidate: () => Promise<undefined | User>;
              isLoading: boolean;
              user: User;
          }
          | {
              error: undefined;
              invalidate: () => Promise<undefined | User>;
              isLoading: boolean;
              user: undefined;
          }

    +useUser | @auth0/nextjs-auth0 - v4.5.1
    • Returns
          | {
              error: Error;
              invalidate: () => Promise<undefined | User>;
              isLoading: boolean;
              user: null;
          }
          | {
              error: null;
              invalidate: () => Promise<undefined | User>;
              isLoading: boolean;
              user: User;
          }
          | {
              error: undefined;
              invalidate: () => Promise<undefined | User>;
              isLoading: boolean;
              user: undefined;
          }

    diff --git a/docs/functions/testing.generateSessionCookie.html b/docs/functions/testing.generateSessionCookie.html index b79f0f4e8..d7a8c4402 100644 --- a/docs/functions/testing.generateSessionCookie.html +++ b/docs/functions/testing.generateSessionCookie.html @@ -1 +1 @@ -generateSessionCookie | @auth0/nextjs-auth0 - v4.5.0
    +generateSessionCookie | @auth0/nextjs-auth0 - v4.5.1
    diff --git a/docs/hierarchy.html b/docs/hierarchy.html index f509c8169..4b5c8d7b9 100644 --- a/docs/hierarchy.html +++ b/docs/hierarchy.html @@ -1 +1 @@ -@auth0/nextjs-auth0 - v4.5.0

    @auth0/nextjs-auth0 - v4.5.0

    Hierarchy Summary

    +@auth0/nextjs-auth0 - v4.5.1

    @auth0/nextjs-auth0 - v4.5.1

    Hierarchy Summary

    diff --git a/docs/index.html b/docs/index.html index 2cdb334d7..1af2ac65b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,4 +1,4 @@ -@auth0/nextjs-auth0 - v4.5.0

    @auth0/nextjs-auth0 - v4.5.0

    Auth0 Next.js SDK Banner

    +@auth0/nextjs-auth0 - v4.5.1

    @auth0/nextjs-auth0 - v4.5.1

    Auth0 Next.js SDK Banner

    The Auth0 Next.js SDK is a library for implementing user authentication in Next.js applications.

    Auth0 Next.js SDK Release Auth0 Next.js SDK Downloads @@ -207,4 +207,4 @@

    This project is licensed under the MIT license. See the LICENSE file for more info. -

    +

    diff --git a/docs/interfaces/types.AccessTokenForConnectionOptions.html b/docs/interfaces/types.AccessTokenForConnectionOptions.html index 0653152ac..6409bd004 100644 --- a/docs/interfaces/types.AccessTokenForConnectionOptions.html +++ b/docs/interfaces/types.AccessTokenForConnectionOptions.html @@ -1,6 +1,6 @@ -AccessTokenForConnectionOptions | @auth0/nextjs-auth0 - v4.5.0

    Interface AccessTokenForConnectionOptions

    Options for retrieving a connection access token.

    -
    interface AccessTokenForConnectionOptions {
        connection: string;
        login_hint?: string;
    }

    Properties

    connection +AccessTokenForConnectionOptions | @auth0/nextjs-auth0 - v4.5.1

    Interface AccessTokenForConnectionOptions

    Options for retrieving a connection access token.

    +
    interface AccessTokenForConnectionOptions {
        connection: string;
        login_hint?: string;
    }

    Properties

    connection: string

    The connection name for while you want to retrieve the access token.

    -
    login_hint?: string

    An optional login hint to pass to the authorization server.

    -
    +
    login_hint?: string

    An optional login hint to pass to the authorization server.

    +
    diff --git a/docs/interfaces/types.Auth0ClientOptions.html b/docs/interfaces/types.Auth0ClientOptions.html index 7f4c629e9..28569c63c 100644 --- a/docs/interfaces/types.Auth0ClientOptions.html +++ b/docs/interfaces/types.Auth0ClientOptions.html @@ -1,4 +1,4 @@ -Auth0ClientOptions | @auth0/nextjs-auth0 - v4.5.0

    Interface Auth0ClientOptions

    interface Auth0ClientOptions {
        allowInsecureRequests?: boolean;
        appBaseUrl?: string;
        authorizationParameters?: AuthorizationParameters;
        beforeSessionSaved?: BeforeSessionSavedHook;
        clientAssertionSigningAlg?: string;
        clientAssertionSigningKey?: string | CryptoKey;
        clientId?: string;
        clientSecret?: string;
        domain?: string;
        enableAccessTokenEndpoint?: boolean;
        enableTelemetry?: boolean;
        httpTimeout?: number;
        onCallback?: OnCallbackHook;
        pushedAuthorizationRequests?: boolean;
        routes?: Partial<
            Pick<Routes, "login" | "callback" | "logout" | "backChannelLogout">,
        >;
        secret?: string;
        session?: SessionConfiguration;
        sessionStore?: SessionDataStore;
        signInReturnToPath?: string;
        transactionCookie?: TransactionCookieOptions;
    }

    Properties

    allowInsecureRequests? +Auth0ClientOptions | @auth0/nextjs-auth0 - v4.5.1

    Interface Auth0ClientOptions

    interface Auth0ClientOptions {
        allowInsecureRequests?: boolean;
        appBaseUrl?: string;
        authorizationParameters?: AuthorizationParameters;
        beforeSessionSaved?: BeforeSessionSavedHook;
        clientAssertionSigningAlg?: string;
        clientAssertionSigningKey?: string | CryptoKey;
        clientId?: string;
        clientSecret?: string;
        domain?: string;
        enableAccessTokenEndpoint?: boolean;
        enableTelemetry?: boolean;
        httpTimeout?: number;
        onCallback?: OnCallbackHook;
        pushedAuthorizationRequests?: boolean;
        routes?: Partial<
            Pick<Routes, "login" | "callback" | "logout" | "backChannelLogout">,
        >;
        secret?: string;
        session?: SessionConfiguration;
        sessionStore?: SessionDataStore;
        signInReturnToPath?: string;
        transactionCookie?: TransactionCookieOptions;
    }

    Properties

    allowInsecureRequests?: boolean

    Allow insecure requests to be made to the authorization server. This can be useful when testing with a mock OIDC provider that does not support TLS, locally. This option can only be used when NODE_ENV is not set to production.

    -
    appBaseUrl?: string

    The URL of your application (e.g.: http://localhost:3000).

    +
    appBaseUrl?: string

    The URL of your application (e.g.: http://localhost:3000).

    If it's not specified, it will be loaded from the APP_BASE_URL environment variable.

    -
    authorizationParameters?: AuthorizationParameters

    Additional parameters to send to the /authorize endpoint.

    -
    beforeSessionSaved?: BeforeSessionSavedHook

    A method to manipulate the session before persisting it.

    +
    authorizationParameters?: AuthorizationParameters

    Additional parameters to send to the /authorize endpoint.

    +
    beforeSessionSaved?: BeforeSessionSavedHook

    A method to manipulate the session before persisting it.

    See beforeSessionSaved for additional details

    -
    clientAssertionSigningAlg?: string

    The algorithm used to sign the client assertion JWT. +

    clientAssertionSigningAlg?: string

    The algorithm used to sign the client assertion JWT. Uses one of token_endpoint_auth_signing_alg_values_supported if not specified. If the Authorization Server discovery document does not list token_endpoint_auth_signing_alg_values_supported this property will be required.

    -
    clientAssertionSigningKey?: string | CryptoKey

    Private key for use with private_key_jwt clients. +

    clientAssertionSigningKey?: string | CryptoKey

    Private key for use with private_key_jwt clients. This should be a string that is the contents of a PEM file or a CryptoKey.

    -
    clientId?: string

    The Auth0 client ID.

    +
    clientId?: string

    The Auth0 client ID.

    If it's not specified, it will be loaded from the AUTH0_CLIENT_ID environment variable.

    -
    clientSecret?: string

    The Auth0 client secret.

    +
    clientSecret?: string

    The Auth0 client secret.

    If it's not specified, it will be loaded from the AUTH0_CLIENT_SECRET environment variable.

    -
    domain?: string

    The Auth0 domain for the tenant (e.g.: example.us.auth0.com).

    +
    domain?: string

    The Auth0 domain for the tenant (e.g.: example.us.auth0.com).

    If it's not specified, it will be loaded from the AUTH0_DOMAIN environment variable.

    -
    enableAccessTokenEndpoint?: boolean

    Boolean value to enable the /auth/access-token endpoint for use in the client app.

    +
    enableAccessTokenEndpoint?: boolean

    Boolean value to enable the /auth/access-token endpoint for use in the client app.

    Defaults to true.

    NOTE: Set this to false if your client does not need to directly interact with resource servers (Token Mediating Backend). This will be false for most apps.

    A security best practice is to disable this to avoid exposing access tokens to the client app.

    See: https://datatracker.ietf.org/doc/html/draft-ietf-oauth-browser-based-apps#name-token-mediating-backend

    -
    enableTelemetry?: boolean

    Boolean value to opt-out of sending the library name and version to your authorization server +

    enableTelemetry?: boolean

    Boolean value to opt-out of sending the library name and version to your authorization server via the Auth0-Client header. Defaults to true.

    -
    httpTimeout?: number

    Integer value for the HTTP timeout in milliseconds for authentication requests. +

    httpTimeout?: number

    Integer value for the HTTP timeout in milliseconds for authentication requests. Defaults to 5000 ms.

    -
    onCallback?: OnCallbackHook

    A method to handle errors or manage redirects after attempting to authenticate.

    +
    onCallback?: OnCallbackHook

    A method to handle errors or manage redirects after attempting to authenticate.

    See onCallback for additional details

    -
    pushedAuthorizationRequests?: boolean

    If enabled, the SDK will use the Pushed Authorization Requests (PAR) protocol when communicating with the authorization server.

    -
    routes?: Partial<
        Pick<Routes, "login" | "callback" | "logout" | "backChannelLogout">,
    >

    Configure the paths for the authentication routes.

    +
    pushedAuthorizationRequests?: boolean

    If enabled, the SDK will use the Pushed Authorization Requests (PAR) protocol when communicating with the authorization server.

    +
    routes?: Partial<
        Pick<Routes, "login" | "callback" | "logout" | "backChannelLogout">,
    >

    Configure the paths for the authentication routes.

    See Custom routes for additional details.

    -
    secret?: string

    A 32-byte, hex-encoded secret used for encrypting cookies.

    +
    secret?: string

    A 32-byte, hex-encoded secret used for encrypting cookies.

    If it's not specified, it will be loaded from the AUTH0_SECRET environment variable.

    -

    Configure the session timeouts and whether to use rolling sessions or not.

    +

    Configure the session timeouts and whether to use rolling sessions or not.

    See Session configuration for additional details.

    -
    sessionStore?: SessionDataStore

    A custom session store implementation used to persist sessions to a data store.

    +
    sessionStore?: SessionDataStore

    A custom session store implementation used to persist sessions to a data store.

    See Database sessions for additional details.

    -
    signInReturnToPath?: string

    The path to redirect the user to after successfully authenticating. Defaults to /.

    -
    transactionCookie?: TransactionCookieOptions

    Configure the transaction cookie used to store the state of the authentication transaction.

    -
    +
    signInReturnToPath?: string

    The path to redirect the user to after successfully authenticating. Defaults to /.

    +
    transactionCookie?: TransactionCookieOptions

    Configure the transaction cookie used to store the state of the authentication transaction.

    +
    diff --git a/docs/interfaces/types.AuthClientOptions.html b/docs/interfaces/types.AuthClientOptions.html index 8b05c7330..d61e303ad 100644 --- a/docs/interfaces/types.AuthClientOptions.html +++ b/docs/interfaces/types.AuthClientOptions.html @@ -1,4 +1,4 @@ -AuthClientOptions | @auth0/nextjs-auth0 - v4.5.0
    interface AuthClientOptions {
        allowInsecureRequests?: boolean;
        appBaseUrl: string;
        authorizationParameters?: AuthorizationParameters;
        beforeSessionSaved?: BeforeSessionSavedHook;
        clientAssertionSigningAlg?: string;
        clientAssertionSigningKey?: string | CryptoKey;
        clientId: string;
        clientSecret?: string;
        domain: string;
        enableAccessTokenEndpoint?: boolean;
        enableTelemetry?: boolean;
        fetch?: {
            (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
            (input: string | URL | Request, init?: RequestInit): Promise<Response>;
        };
        httpTimeout?: number;
        jwksCache?: JWKSCacheInput;
        onCallback?: OnCallbackHook;
        pushedAuthorizationRequests?: boolean;
        routes?: Partial<
            Pick<Routes, "login" | "callback" | "logout" | "backChannelLogout">,
        >;
        secret: string;
        sessionStore: AbstractSessionStore;
        signInReturnToPath?: string;
        transactionStore: TransactionStore;
    }

    Properties

    allowInsecureRequests? +AuthClientOptions | @auth0/nextjs-auth0 - v4.5.1
    interface AuthClientOptions {
        allowInsecureRequests?: boolean;
        appBaseUrl: string;
        authorizationParameters?: AuthorizationParameters;
        beforeSessionSaved?: BeforeSessionSavedHook;
        clientAssertionSigningAlg?: string;
        clientAssertionSigningKey?: string | CryptoKey;
        clientId: string;
        clientSecret?: string;
        domain: string;
        enableAccessTokenEndpoint?: boolean;
        enableTelemetry?: boolean;
        fetch?: {
            (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
            (input: string | URL | Request, init?: RequestInit): Promise<Response>;
        };
        httpTimeout?: number;
        jwksCache?: JWKSCacheInput;
        onCallback?: OnCallbackHook;
        pushedAuthorizationRequests?: boolean;
        routes?: Partial<
            Pick<Routes, "login" | "callback" | "logout" | "backChannelLogout">,
        >;
        secret: string;
        sessionStore: AbstractSessionStore;
        signInReturnToPath?: string;
        transactionStore: TransactionStore;
    }

    Properties

    allowInsecureRequests?: boolean
    appBaseUrl: string
    authorizationParameters?: AuthorizationParameters
    beforeSessionSaved?: BeforeSessionSavedHook
    clientAssertionSigningAlg?: string
    clientAssertionSigningKey?: string | CryptoKey
    clientId: string
    clientSecret?: string
    domain: string
    enableAccessTokenEndpoint?: boolean
    enableTelemetry?: boolean
    fetch?: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | URL | Request, init?: RequestInit): Promise<Response>;
    }

    Type declaration

      • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>

    Properties

    allowInsecureRequests?: boolean
    appBaseUrl: string
    authorizationParameters?: AuthorizationParameters
    beforeSessionSaved?: BeforeSessionSavedHook
    clientAssertionSigningAlg?: string
    clientAssertionSigningKey?: string | CryptoKey
    clientId: string
    clientSecret?: string
    domain: string
    enableAccessTokenEndpoint?: boolean
    enableTelemetry?: boolean
    fetch?: {
        (input: URL | RequestInfo, init?: RequestInit): Promise<Response>;
        (input: string | URL | Request, init?: RequestInit): Promise<Response>;
    }

    Type declaration

      • (input: URL | RequestInfo, init?: RequestInit): Promise<Response>
      • Parameters

        • input: URL | RequestInfo
        • Optionalinit: RequestInit

        Returns Promise<Response>

      • (input: string | URL | Request, init?: RequestInit): Promise<Response>
      • Parameters

        • input: string | URL | Request
        • Optionalinit: RequestInit

        Returns Promise<Response>

    httpTimeout?: number
    jwksCache?: JWKSCacheInput
    onCallback?: OnCallbackHook
    pushedAuthorizationRequests?: boolean
    routes?: Partial<
        Pick<Routes, "login" | "callback" | "logout" | "backChannelLogout">,
    >
    secret: string
    sessionStore: AbstractSessionStore
    signInReturnToPath?: string
    transactionStore: TransactionStore
    +

    Parameters

    Returns Promise<Response>

    httpTimeout?: number
    jwksCache?: JWKSCacheInput
    onCallback?: OnCallbackHook
    pushedAuthorizationRequests?: boolean
    routes?: Partial<
        Pick<Routes, "login" | "callback" | "logout" | "backChannelLogout">,
    >
    secret: string
    sessionStore: AbstractSessionStore
    signInReturnToPath?: string
    transactionStore: TransactionStore
    diff --git a/docs/interfaces/types.AuthorizationParameters.html b/docs/interfaces/types.AuthorizationParameters.html index 94aa6c74a..cbba703d5 100644 --- a/docs/interfaces/types.AuthorizationParameters.html +++ b/docs/interfaces/types.AuthorizationParameters.html @@ -1,11 +1,11 @@ -AuthorizationParameters | @auth0/nextjs-auth0 - v4.5.0

    Interface AuthorizationParameters

    interface AuthorizationParameters {
        audience?: null | string;
        max_age?: number;
        redirect_uri?: null | string;
        scope?: null | string;
        [key: string]: unknown;
    }

    Indexable

    • [key: string]: unknown

      Additional authorization parameters.

      -

    Properties

    audience? +AuthorizationParameters | @auth0/nextjs-auth0 - v4.5.1

    Interface AuthorizationParameters

    interface AuthorizationParameters {
        audience?: null | string;
        max_age?: number;
        redirect_uri?: null | string;
        scope?: null | string;
        [key: string]: unknown;
    }

    Indexable

    • [key: string]: unknown

      Additional authorization parameters.

      +

    Properties

    audience?: null | string

    The unique identifier of the target API you want to access.

    -
    max_age?: number

    The maximum amount of time, in seconds, after which a user must reauthenticate.

    -
    redirect_uri?: null | string

    The URL to which the authorization server will redirect the user after granting authorization.

    -
    scope?: null | string

    The scope of the access request, expressed as a list of space-delimited, case-sensitive strings. +

    max_age?: number

    The maximum amount of time, in seconds, after which a user must reauthenticate.

    +
    redirect_uri?: null | string

    The URL to which the authorization server will redirect the user after granting authorization.

    +
    scope?: null | string

    The scope of the access request, expressed as a list of space-delimited, case-sensitive strings. Defaults to "openid profile email offline_access".

    -
    +
    diff --git a/docs/interfaces/types.ConnectionTokenSet.html b/docs/interfaces/types.ConnectionTokenSet.html index 7324ced28..dca30acd0 100644 --- a/docs/interfaces/types.ConnectionTokenSet.html +++ b/docs/interfaces/types.ConnectionTokenSet.html @@ -1,5 +1,5 @@ -ConnectionTokenSet | @auth0/nextjs-auth0 - v4.5.0

    Interface ConnectionTokenSet

    interface ConnectionTokenSet {
        accessToken: string;
        connection: string;
        expiresAt: number;
        scope?: string;
        [key: string]: unknown;
    }

    Indexable

    • [key: string]: unknown

    Properties

    accessToken +ConnectionTokenSet | @auth0/nextjs-auth0 - v4.5.1

    Interface ConnectionTokenSet

    interface ConnectionTokenSet {
        accessToken: string;
        connection: string;
        expiresAt: number;
        scope?: string;
        [key: string]: unknown;
    }

    Indexable

    • [key: string]: unknown

    Properties

    accessToken: string
    connection: string
    expiresAt: number
    scope?: string
    +

    Properties

    accessToken: string
    connection: string
    expiresAt: number
    scope?: string
    diff --git a/docs/interfaces/types.CookieOptions.html b/docs/interfaces/types.CookieOptions.html index 59759d4fc..8dc694289 100644 --- a/docs/interfaces/types.CookieOptions.html +++ b/docs/interfaces/types.CookieOptions.html @@ -1,8 +1,8 @@ -CookieOptions | @auth0/nextjs-auth0 - v4.5.0
    interface CookieOptions {
        domain?: string;
        httpOnly: boolean;
        maxAge?: number;
        path: string;
        sameSite: "lax" | "strict" | "none";
        secure: boolean;
        transient?: boolean;
    }

    Properties

    domain? +CookieOptions | @auth0/nextjs-auth0 - v4.5.1
    interface CookieOptions {
        domain?: string;
        httpOnly: boolean;
        maxAge?: number;
        path: string;
        sameSite: "lax" | "strict" | "none";
        secure: boolean;
        transient?: boolean;
    }

    Properties

    domain?: string
    httpOnly: boolean
    maxAge?: number
    path: string
    sameSite: "lax" | "strict" | "none"
    secure: boolean
    transient?: boolean
    +

    Properties

    domain?: string
    httpOnly: boolean
    maxAge?: number
    path: string
    sameSite: "lax" | "strict" | "none"
    secure: boolean
    transient?: boolean
    diff --git a/docs/interfaces/types.Routes.html b/docs/interfaces/types.Routes.html index c812d66a9..f920c4e9f 100644 --- a/docs/interfaces/types.Routes.html +++ b/docs/interfaces/types.Routes.html @@ -1,7 +1,7 @@ -Routes | @auth0/nextjs-auth0 - v4.5.0
    interface Routes {
        accessToken: string;
        backChannelLogout: string;
        callback: string;
        login: string;
        logout: string;
        profile: string;
    }

    Properties

    accessToken +Routes | @auth0/nextjs-auth0 - v4.5.1
    interface Routes {
        accessToken: string;
        backChannelLogout: string;
        callback: string;
        login: string;
        logout: string;
        profile: string;
    }

    Properties

    accessToken: string
    backChannelLogout: string
    callback: string
    login: string
    logout: string
    profile: string
    +

    Properties

    accessToken: string
    backChannelLogout: string
    callback: string
    login: string
    logout: string
    profile: string
    diff --git a/docs/interfaces/types.SessionConfiguration.html b/docs/interfaces/types.SessionConfiguration.html index 9f071d9d7..7e08a2ec2 100644 --- a/docs/interfaces/types.SessionConfiguration.html +++ b/docs/interfaces/types.SessionConfiguration.html @@ -1,16 +1,16 @@ -SessionConfiguration | @auth0/nextjs-auth0 - v4.5.0

    Interface SessionConfiguration

    interface SessionConfiguration {
        absoluteDuration?: number;
        cookie?: SessionCookieOptions;
        inactivityDuration?: number;
        rolling?: boolean;
    }

    Hierarchy (View Summary)

    Properties

    absoluteDuration? +SessionConfiguration | @auth0/nextjs-auth0 - v4.5.1

    Interface SessionConfiguration

    interface SessionConfiguration {
        absoluteDuration?: number;
        cookie?: SessionCookieOptions;
        inactivityDuration?: number;
        rolling?: boolean;
    }

    Hierarchy (View Summary)

    Properties

    absoluteDuration?: number

    The absolute duration after which the session will expire. The value must be specified in seconds..

    Once the absolute duration has been reached, the session will no longer be extended.

    Default: 3 days.

    -

    The options for the session cookie.

    -
    inactivityDuration?: number

    The duration of inactivity after which the session will expire. The value must be specified in seconds.

    +

    The options for the session cookie.

    +
    inactivityDuration?: number

    The duration of inactivity after which the session will expire. The value must be specified in seconds.

    The session will be extended as long as it was active before the inactivity duration has been reached.

    Default: 1 day.

    -
    rolling?: boolean

    A boolean indicating whether rolling sessions should be used or not.

    +
    rolling?: boolean

    A boolean indicating whether rolling sessions should be used or not.

    When enabled, the session will continue to be extended as long as it is used within the inactivity duration. Once the upper bound, set via the absoluteDuration, has been reached, the session will no longer be extended.

    Default: true.

    -
    +
    diff --git a/docs/interfaces/types.SessionCookieOptions.html b/docs/interfaces/types.SessionCookieOptions.html index 55c287918..0e246b22a 100644 --- a/docs/interfaces/types.SessionCookieOptions.html +++ b/docs/interfaces/types.SessionCookieOptions.html @@ -1,4 +1,4 @@ -SessionCookieOptions | @auth0/nextjs-auth0 - v4.5.0

    Interface SessionCookieOptions

    interface SessionCookieOptions {
        domain?: string;
        name?: string;
        path?: string;
        sameSite?: "lax" | "strict" | "none";
        secure?: boolean;
        transient?: boolean;
    }

    Properties

    domain? +SessionCookieOptions | @auth0/nextjs-auth0 - v4.5.1

    Interface SessionCookieOptions

    interface SessionCookieOptions {
        domain?: string;
        name?: string;
        path?: string;
        sameSite?: "lax" | "strict" | "none";
        secure?: boolean;
        transient?: boolean;
    }

    Properties

    domain? name? path? sameSite? @@ -7,12 +7,12 @@

    Properties

    domain?: string

    Specifies the value for the Set-Cookie attribute. By default, no domain is set, and most clients will consider the cookie to apply to only the current domain.

    -
    name?: string

    The name of the session cookie.

    +
    name?: string

    The name of the session cookie.

    Default: __session.

    -
    path?: string

    The path attribute of the session cookie. Will be set to '/' by default.

    -
    sameSite?: "lax" | "strict" | "none"

    The sameSite attribute of the session cookie.

    +
    path?: string

    The path attribute of the session cookie. Will be set to '/' by default.

    +
    sameSite?: "lax" | "strict" | "none"

    The sameSite attribute of the session cookie.

    Default: lax.

    -
    secure?: boolean

    The secure attribute of the session cookie.

    +
    secure?: boolean

    The secure attribute of the session cookie.

    Default: depends on the protocol of the application's base URL. If the protocol is https, then true, otherwise false.

    -
    transient?: boolean

    The transient attribute of the session cookie. When true, the cookie will not persist beyond the current session.

    -
    +
    transient?: boolean

    The transient attribute of the session cookie. When true, the cookie will not persist beyond the current session.

    +
    diff --git a/docs/interfaces/types.SessionData.html b/docs/interfaces/types.SessionData.html index 04713f369..ab871e39c 100644 --- a/docs/interfaces/types.SessionData.html +++ b/docs/interfaces/types.SessionData.html @@ -1,5 +1,5 @@ -SessionData | @auth0/nextjs-auth0 - v4.5.0
    interface SessionData {
        connectionTokenSets?: ConnectionTokenSet[];
        internal: { createdAt: number; sid: string };
        tokenSet: TokenSet;
        user: User;
        [key: string]: unknown;
    }

    Indexable

    • [key: string]: unknown

    Properties

    connectionTokenSets? +SessionData | @auth0/nextjs-auth0 - v4.5.1
    interface SessionData {
        connectionTokenSets?: ConnectionTokenSet[];
        internal: { createdAt: number; sid: string };
        tokenSet: TokenSet;
        user: User;
        [key: string]: unknown;
    }

    Indexable

    • [key: string]: unknown

    Properties

    connectionTokenSets?: ConnectionTokenSet[]
    internal: { createdAt: number; sid: string }
    tokenSet: TokenSet
    user: User
    +

    Properties

    connectionTokenSets?: ConnectionTokenSet[]
    internal: { createdAt: number; sid: string }
    tokenSet: TokenSet
    user: User
    diff --git a/docs/interfaces/types.SessionDataStore.html b/docs/interfaces/types.SessionDataStore.html index de3420c3d..459ec4974 100644 --- a/docs/interfaces/types.SessionDataStore.html +++ b/docs/interfaces/types.SessionDataStore.html @@ -1,9 +1,9 @@ -SessionDataStore | @auth0/nextjs-auth0 - v4.5.0
    interface SessionDataStore {
        delete(id: string): Promise<void>;
        deleteByLogoutToken(logoutToken: LogoutToken): Promise<void>;
        get(id: string): Promise<null | SessionData>;
        set(id: string, session: SessionData): Promise<void>;
    }

    Methods

    delete +SessionDataStore | @auth0/nextjs-auth0 - v4.5.1
    interface SessionDataStore {
        delete(id: string): Promise<void>;
        deleteByLogoutToken(logoutToken: LogoutToken): Promise<void>;
        get(id: string): Promise<null | SessionData>;
        set(id: string, session: SessionData): Promise<void>;
    }

    Methods

    • Destroys the session with the given session ID.

      -

      Parameters

      • id: string

      Returns Promise<void>

    • Deletes the session with the given logout token which may contain a session ID or a user ID, or both.

      -

      Parameters

      Returns Promise<void>

    +

    Parameters

    • id: string

    Returns Promise<void>

    • Deletes the session with the given logout token which may contain a session ID or a user ID, or both.

      +

      Parameters

      Returns Promise<void>

    diff --git a/docs/interfaces/types.SessionStoreOptions.html b/docs/interfaces/types.SessionStoreOptions.html index bae12846e..637765b68 100644 --- a/docs/interfaces/types.SessionStoreOptions.html +++ b/docs/interfaces/types.SessionStoreOptions.html @@ -1,4 +1,4 @@ -SessionStoreOptions | @auth0/nextjs-auth0 - v4.5.0

    Interface SessionStoreOptions

    interface SessionStoreOptions {
        absoluteDuration?: number;
        cookie?: SessionCookieOptions;
        cookieOptions?: SessionCookieOptions;
        inactivityDuration?: number;
        rolling?: boolean;
        secret: string;
        store?: SessionDataStore;
    }

    Hierarchy (View Summary)

    Properties

    absoluteDuration? +SessionStoreOptions | @auth0/nextjs-auth0 - v4.5.1

    Interface SessionStoreOptions

    interface SessionStoreOptions {
        absoluteDuration?: number;
        cookie?: SessionCookieOptions;
        cookieOptions?: SessionCookieOptions;
        inactivityDuration?: number;
        rolling?: boolean;
        secret: string;
        store?: SessionDataStore;
    }

    Hierarchy (View Summary)

    Properties

    absoluteDuration?: number

    The absolute duration after which the session will expire. The value must be specified in seconds..

    Once the absolute duration has been reached, the session will no longer be extended.

    Default: 3 days.

    -

    The options for the session cookie.

    -
    cookieOptions?: SessionCookieOptions
    inactivityDuration?: number

    The duration of inactivity after which the session will expire. The value must be specified in seconds.

    +

    The options for the session cookie.

    +
    cookieOptions?: SessionCookieOptions
    inactivityDuration?: number

    The duration of inactivity after which the session will expire. The value must be specified in seconds.

    The session will be extended as long as it was active before the inactivity duration has been reached.

    Default: 1 day.

    -
    rolling?: boolean

    A boolean indicating whether rolling sessions should be used or not.

    +
    rolling?: boolean

    A boolean indicating whether rolling sessions should be used or not.

    When enabled, the session will continue to be extended as long as it is used within the inactivity duration. Once the upper bound, set via the absoluteDuration, has been reached, the session will no longer be extended.

    Default: true.

    -
    secret: string
    +
    secret: string
    diff --git a/docs/interfaces/types.StartInteractiveLoginOptions.html b/docs/interfaces/types.StartInteractiveLoginOptions.html index d51680c99..0d4c5d875 100644 --- a/docs/interfaces/types.StartInteractiveLoginOptions.html +++ b/docs/interfaces/types.StartInteractiveLoginOptions.html @@ -1,5 +1,5 @@ -StartInteractiveLoginOptions | @auth0/nextjs-auth0 - v4.5.0

    Interface StartInteractiveLoginOptions

    interface StartInteractiveLoginOptions {
        authorizationParameters?: AuthorizationParameters;
        returnTo?: string;
    }

    Properties

    authorizationParameters? +StartInteractiveLoginOptions | @auth0/nextjs-auth0 - v4.5.1

    Interface StartInteractiveLoginOptions

    interface StartInteractiveLoginOptions {
        authorizationParameters?: AuthorizationParameters;
        returnTo?: string;
    }

    Properties

    authorizationParameters?: AuthorizationParameters

    Authorization parameters to be passed to the authorization server.

    -
    returnTo?: string

    The URL to redirect to after a successful login.

    -
    +
    returnTo?: string

    The URL to redirect to after a successful login.

    +
    diff --git a/docs/interfaces/types.TokenSet.html b/docs/interfaces/types.TokenSet.html index 5fe18e418..039d315d0 100644 --- a/docs/interfaces/types.TokenSet.html +++ b/docs/interfaces/types.TokenSet.html @@ -1,6 +1,6 @@ -TokenSet | @auth0/nextjs-auth0 - v4.5.0
    interface TokenSet {
        accessToken: string;
        expiresAt: number;
        idToken?: string;
        refreshToken?: string;
        scope?: string;
    }

    Properties

    accessToken +TokenSet | @auth0/nextjs-auth0 - v4.5.1
    interface TokenSet {
        accessToken: string;
        expiresAt: number;
        idToken?: string;
        refreshToken?: string;
        scope?: string;
    }

    Properties

    accessToken: string
    expiresAt: number
    idToken?: string
    refreshToken?: string
    scope?: string
    +

    Properties

    accessToken: string
    expiresAt: number
    idToken?: string
    refreshToken?: string
    scope?: string
    diff --git a/docs/interfaces/types.TransactionCookieOptions.html b/docs/interfaces/types.TransactionCookieOptions.html index 8056b4089..48da30ad6 100644 --- a/docs/interfaces/types.TransactionCookieOptions.html +++ b/docs/interfaces/types.TransactionCookieOptions.html @@ -1,12 +1,12 @@ -TransactionCookieOptions | @auth0/nextjs-auth0 - v4.5.0

    Interface TransactionCookieOptions

    interface TransactionCookieOptions {
        path?: string;
        prefix?: string;
        sameSite?: "lax" | "strict" | "none";
        secure?: boolean;
    }

    Properties

    path? +TransactionCookieOptions | @auth0/nextjs-auth0 - v4.5.1

    Interface TransactionCookieOptions

    interface TransactionCookieOptions {
        path?: string;
        prefix?: string;
        sameSite?: "lax" | "strict" | "none";
        secure?: boolean;
    }

    Properties

    path?: string

    The path attribute of the transaction cookie. Will be set to '/' by default.

    -
    prefix?: string

    The prefix of the cookie used to store the transaction state.

    +
    prefix?: string

    The prefix of the cookie used to store the transaction state.

    Default: __txn_{state}.

    -
    sameSite?: "lax" | "strict" | "none"

    The sameSite attribute of the transaction cookie.

    +
    sameSite?: "lax" | "strict" | "none"

    The sameSite attribute of the transaction cookie.

    Default: lax.

    -
    secure?: boolean

    The secure attribute of the transaction cookie.

    +
    secure?: boolean

    The secure attribute of the transaction cookie.

    Default: depends on the protocol of the application's base URL. If the protocol is https, then true, otherwise false.

    -
    +
    diff --git a/docs/interfaces/types.TransactionState.html b/docs/interfaces/types.TransactionState.html index 6ba30baf8..cba94d311 100644 --- a/docs/interfaces/types.TransactionState.html +++ b/docs/interfaces/types.TransactionState.html @@ -1,8 +1,8 @@ -TransactionState | @auth0/nextjs-auth0 - v4.5.0
    interface TransactionState {
        codeVerifier: string;
        maxAge?: number;
        nonce: string;
        responseType: string;
        returnTo: string;
        state: string;
        [propName: string]: unknown;
    }

    Hierarchy

    • JWTPayload
      • TransactionState

    Indexable

    • [propName: string]: unknown

      Any other JWT Claim Set member.

      -

    Properties

    codeVerifier +TransactionState | @auth0/nextjs-auth0 - v4.5.1
    interface TransactionState {
        codeVerifier: string;
        maxAge?: number;
        nonce: string;
        responseType: string;
        returnTo: string;
        state: string;
        [propName: string]: unknown;
    }

    Hierarchy

    • JWTPayload
      • TransactionState

    Indexable

    • [propName: string]: unknown

      Any other JWT Claim Set member.

      +

    Properties

    codeVerifier: string
    maxAge?: number
    nonce: string
    responseType: string
    returnTo: string
    state: string
    +

    Properties

    codeVerifier: string
    maxAge?: number
    nonce: string
    responseType: string
    returnTo: string
    state: string
    diff --git a/docs/interfaces/types.TransactionStoreOptions.html b/docs/interfaces/types.TransactionStoreOptions.html index 738632bcd..522785cc8 100644 --- a/docs/interfaces/types.TransactionStoreOptions.html +++ b/docs/interfaces/types.TransactionStoreOptions.html @@ -1,3 +1,3 @@ -TransactionStoreOptions | @auth0/nextjs-auth0 - v4.5.0

    Interface TransactionStoreOptions

    interface TransactionStoreOptions {
        cookieOptions?: TransactionCookieOptions;
        secret: string;
    }

    Properties

    cookieOptions? +TransactionStoreOptions | @auth0/nextjs-auth0 - v4.5.1

    Interface TransactionStoreOptions

    interface TransactionStoreOptions {
        cookieOptions?: TransactionCookieOptions;
        secret: string;
    }

    Properties

    cookieOptions?: TransactionCookieOptions
    secret: string
    +

    Properties

    cookieOptions?: TransactionCookieOptions
    secret: string
    diff --git a/docs/interfaces/types.User.html b/docs/interfaces/types.User.html index 0f4dd323c..f54e7d90a 100644 --- a/docs/interfaces/types.User.html +++ b/docs/interfaces/types.User.html @@ -1,4 +1,4 @@ -User | @auth0/nextjs-auth0 - v4.5.0
    interface User {
        email?: string;
        email_verified?: boolean;
        family_name?: string;
        given_name?: string;
        name?: string;
        nickname?: string;
        org_id?: string;
        picture?: string;
        sub: string;
        [key: string]: any;
    }

    Indexable

    • [key: string]: any

    Properties

    email? +User | @auth0/nextjs-auth0 - v4.5.1
    interface User {
        email?: string;
        email_verified?: boolean;
        family_name?: string;
        given_name?: string;
        name?: string;
        nickname?: string;
        org_id?: string;
        picture?: string;
        sub: string;
        [key: string]: any;
    }

    Indexable

    • [key: string]: any

    Properties

    email?: string
    email_verified?: boolean
    family_name?: string
    given_name?: string
    name?: string
    nickname?: string
    org_id?: string
    picture?: string
    sub: string
    +

    Properties

    email?: string
    email_verified?: boolean
    family_name?: string
    given_name?: string
    name?: string
    nickname?: string
    org_id?: string
    picture?: string
    sub: string
    diff --git a/docs/modules.html b/docs/modules.html index 81910d4c5..1c230c8c0 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -1 +1 @@ -@auth0/nextjs-auth0 - v4.5.0

    @auth0/nextjs-auth0 - v4.5.0

    Modules

    client
    errors
    server
    testing
    types
    +@auth0/nextjs-auth0 - v4.5.1

    @auth0/nextjs-auth0 - v4.5.1

    Modules

    client
    errors
    server
    testing
    types
    diff --git a/docs/modules/client.html b/docs/modules/client.html index cbb2fd60d..f9aadc0df 100644 --- a/docs/modules/client.html +++ b/docs/modules/client.html @@ -1 +1 @@ -client | @auth0/nextjs-auth0 - v4.5.0

    Functions

    Auth0Provider
    getAccessToken
    useUser
    +client | @auth0/nextjs-auth0 - v4.5.1

    Functions

    Auth0Provider
    getAccessToken
    useUser
    diff --git a/docs/modules/errors.html b/docs/modules/errors.html index 0f3ad939c..9bab87328 100644 --- a/docs/modules/errors.html +++ b/docs/modules/errors.html @@ -1 +1 @@ -errors | @auth0/nextjs-auth0 - v4.5.0

    Enumerations

    AccessTokenErrorCode
    AccessTokenForConnectionErrorCode

    Classes

    AccessTokenError
    AccessTokenForConnectionError
    AuthorizationCodeGrantError
    AuthorizationError
    BackchannelLogoutError
    DiscoveryError
    InvalidStateError
    MissingStateError
    OAuth2Error
    SdkError
    +errors | @auth0/nextjs-auth0 - v4.5.1

    Enumerations

    AccessTokenErrorCode
    AccessTokenForConnectionErrorCode

    Classes

    AccessTokenError
    AccessTokenForConnectionError
    AuthorizationCodeGrantError
    AuthorizationError
    BackchannelLogoutError
    DiscoveryError
    InvalidStateError
    MissingStateError
    OAuth2Error
    SdkError
    diff --git a/docs/modules/server.html b/docs/modules/server.html index 23384ebb0..99049cb37 100644 --- a/docs/modules/server.html +++ b/docs/modules/server.html @@ -1 +1 @@ -server | @auth0/nextjs-auth0 - v4.5.0

    Classes

    AbstractSessionStore
    Auth0Client
    AuthClient
    TransactionStore
    +server | @auth0/nextjs-auth0 - v4.5.1

    Classes

    AbstractSessionStore
    Auth0Client
    AuthClient
    TransactionStore
    diff --git a/docs/modules/testing.html b/docs/modules/testing.html index 1b71ad694..3a89c200f 100644 --- a/docs/modules/testing.html +++ b/docs/modules/testing.html @@ -1 +1 @@ -testing | @auth0/nextjs-auth0 - v4.5.0

    Type Aliases

    GenerateSessionCookieConfig

    Functions

    generateSessionCookie
    +testing | @auth0/nextjs-auth0 - v4.5.1

    Type Aliases

    GenerateSessionCookieConfig

    Functions

    generateSessionCookie
    diff --git a/docs/modules/types.html b/docs/modules/types.html index 3944a459b..2ead8af49 100644 --- a/docs/modules/types.html +++ b/docs/modules/types.html @@ -1 +1 @@ -types | @auth0/nextjs-auth0 - v4.5.0

    Interfaces

    AccessTokenForConnectionOptions
    Auth0ClientOptions
    AuthClientOptions
    AuthorizationParameters
    ConnectionTokenSet
    CookieOptions
    Routes
    SessionConfiguration
    SessionCookieOptions
    SessionData
    SessionDataStore
    SessionStoreOptions
    StartInteractiveLoginOptions
    TokenSet
    TransactionCookieOptions
    TransactionState
    TransactionStoreOptions
    User

    Type Aliases

    BeforeSessionSavedHook
    LogoutToken
    OnCallbackContext
    OnCallbackHook
    PagesRouterRequest
    PagesRouterResponse
    ReadonlyRequestCookies
    RoutesOptions
    +types | @auth0/nextjs-auth0 - v4.5.1

    Interfaces

    AccessTokenForConnectionOptions
    Auth0ClientOptions
    AuthClientOptions
    AuthorizationParameters
    ConnectionTokenSet
    CookieOptions
    Routes
    SessionConfiguration
    SessionCookieOptions
    SessionData
    SessionDataStore
    SessionStoreOptions
    StartInteractiveLoginOptions
    TokenSet
    TransactionCookieOptions
    TransactionState
    TransactionStoreOptions
    User

    Type Aliases

    BeforeSessionSavedHook
    LogoutToken
    OnCallbackContext
    OnCallbackHook
    PagesRouterRequest
    PagesRouterResponse
    ReadonlyRequestCookies
    RoutesOptions
    diff --git a/docs/types/testing.GenerateSessionCookieConfig.html b/docs/types/testing.GenerateSessionCookieConfig.html index aff855073..f8d030fe6 100644 --- a/docs/types/testing.GenerateSessionCookieConfig.html +++ b/docs/types/testing.GenerateSessionCookieConfig.html @@ -1,3 +1,3 @@ -GenerateSessionCookieConfig | @auth0/nextjs-auth0 - v4.5.0

    Type Alias GenerateSessionCookieConfig

    GenerateSessionCookieConfig: { secret: string }

    Type declaration

    • secret: string

      The secret used to derive an encryption key for the session cookie.

      +GenerateSessionCookieConfig | @auth0/nextjs-auth0 - v4.5.1

      Type Alias GenerateSessionCookieConfig

      GenerateSessionCookieConfig: { secret: string }

      Type declaration

      • secret: string

        The secret used to derive an encryption key for the session cookie.

        IMPORTANT: you must use the same value as in the SDK configuration.

        -
      +
    diff --git a/docs/types/types.BeforeSessionSavedHook.html b/docs/types/types.BeforeSessionSavedHook.html index 4f23a9659..8ba0e9401 100644 --- a/docs/types/types.BeforeSessionSavedHook.html +++ b/docs/types/types.BeforeSessionSavedHook.html @@ -1 +1 @@ -BeforeSessionSavedHook | @auth0/nextjs-auth0 - v4.5.0

    Type Alias BeforeSessionSavedHook

    BeforeSessionSavedHook: (
        session: SessionData,
        idToken: string | null,
    ) => Promise<SessionData>

    Type declaration

    +BeforeSessionSavedHook | @auth0/nextjs-auth0 - v4.5.1

    Type Alias BeforeSessionSavedHook

    BeforeSessionSavedHook: (
        session: SessionData,
        idToken: string | null,
    ) => Promise<SessionData>

    Type declaration

    diff --git a/docs/types/types.LogoutToken.html b/docs/types/types.LogoutToken.html index 05cfb9d63..db2924104 100644 --- a/docs/types/types.LogoutToken.html +++ b/docs/types/types.LogoutToken.html @@ -1 +1 @@ -LogoutToken | @auth0/nextjs-auth0 - v4.5.0
    LogoutToken: { sid?: string; sub?: string }

    Type declaration

    • Optionalsid?: string
    • Optionalsub?: string
    +LogoutToken | @auth0/nextjs-auth0 - v4.5.1
    LogoutToken: { sid?: string; sub?: string }

    Type declaration

    • Optionalsid?: string
    • Optionalsub?: string
    diff --git a/docs/types/types.OnCallbackContext.html b/docs/types/types.OnCallbackContext.html index 68f5e80cf..6a3494d7c 100644 --- a/docs/types/types.OnCallbackContext.html +++ b/docs/types/types.OnCallbackContext.html @@ -1 +1 @@ -OnCallbackContext | @auth0/nextjs-auth0 - v4.5.0

    Type Alias OnCallbackContext

    OnCallbackContext: { returnTo?: string }

    Type declaration

    • OptionalreturnTo?: string
    +OnCallbackContext | @auth0/nextjs-auth0 - v4.5.1

    Type Alias OnCallbackContext

    OnCallbackContext: { returnTo?: string }

    Type declaration

    • OptionalreturnTo?: string
    diff --git a/docs/types/types.OnCallbackHook.html b/docs/types/types.OnCallbackHook.html index 932a16f61..1192348f8 100644 --- a/docs/types/types.OnCallbackHook.html +++ b/docs/types/types.OnCallbackHook.html @@ -1 +1 @@ -OnCallbackHook | @auth0/nextjs-auth0 - v4.5.0
    OnCallbackHook: (
        error: SdkError | null,
        ctx: OnCallbackContext,
        session: SessionData | null,
    ) => Promise<NextResponse>

    Type declaration

    +OnCallbackHook | @auth0/nextjs-auth0 - v4.5.1
    OnCallbackHook: (
        error: SdkError | null,
        ctx: OnCallbackContext,
        session: SessionData | null,
    ) => Promise<NextResponse>

    Type declaration

    diff --git a/docs/types/types.PagesRouterRequest.html b/docs/types/types.PagesRouterRequest.html index 8eb971799..8bbf10aa5 100644 --- a/docs/types/types.PagesRouterRequest.html +++ b/docs/types/types.PagesRouterRequest.html @@ -1 +1 @@ -PagesRouterRequest | @auth0/nextjs-auth0 - v4.5.0

    Type Alias PagesRouterRequest

    PagesRouterRequest: IncomingMessage | NextApiRequest
    +PagesRouterRequest | @auth0/nextjs-auth0 - v4.5.1

    Type Alias PagesRouterRequest

    PagesRouterRequest: IncomingMessage | NextApiRequest
    diff --git a/docs/types/types.PagesRouterResponse.html b/docs/types/types.PagesRouterResponse.html index ac34e77c0..188aae767 100644 --- a/docs/types/types.PagesRouterResponse.html +++ b/docs/types/types.PagesRouterResponse.html @@ -1 +1 @@ -PagesRouterResponse | @auth0/nextjs-auth0 - v4.5.0

    Type Alias PagesRouterResponse

    PagesRouterResponse: ServerResponse<IncomingMessage> | NextApiResponse
    +PagesRouterResponse | @auth0/nextjs-auth0 - v4.5.1

    Type Alias PagesRouterResponse

    PagesRouterResponse: ServerResponse<IncomingMessage> | NextApiResponse
    diff --git a/docs/types/types.ReadonlyRequestCookies.html b/docs/types/types.ReadonlyRequestCookies.html index 9366f5ef3..edd05317c 100644 --- a/docs/types/types.ReadonlyRequestCookies.html +++ b/docs/types/types.ReadonlyRequestCookies.html @@ -1 +1 @@ -ReadonlyRequestCookies | @auth0/nextjs-auth0 - v4.5.0

    Type Alias ReadonlyRequestCookies

    ReadonlyRequestCookies: Omit<RequestCookies, "set" | "clear" | "delete"> & Pick<
        ResponseCookies,
        "set"
        | "delete",
    >
    +ReadonlyRequestCookies | @auth0/nextjs-auth0 - v4.5.1

    Type Alias ReadonlyRequestCookies

    ReadonlyRequestCookies: Omit<RequestCookies, "set" | "clear" | "delete"> & Pick<
        ResponseCookies,
        "set"
        | "delete",
    >
    diff --git a/docs/types/types.RoutesOptions.html b/docs/types/types.RoutesOptions.html index 59b5dfff8..ecaa86775 100644 --- a/docs/types/types.RoutesOptions.html +++ b/docs/types/types.RoutesOptions.html @@ -1 +1 @@ -RoutesOptions | @auth0/nextjs-auth0 - v4.5.0
    RoutesOptions: Partial<
        Pick<Routes, "login" | "callback" | "logout" | "backChannelLogout">,
    >
    +RoutesOptions | @auth0/nextjs-auth0 - v4.5.1
    RoutesOptions: Partial<
        Pick<Routes, "login" | "callback" | "logout" | "backChannelLogout">,
    >
    diff --git a/package.json b/package.json index 7cad37ada..13587181e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@auth0/nextjs-auth0", - "version": "4.5.0", + "version": "4.5.1", "description": "Auth0 Next.js SDK", "scripts": { "build": "tsc",