diff --git a/.version b/.version index ef0fc7d33..1ac1c1477 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -v4.4.1 \ No newline at end of file +v4.4.2 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a67e4789..2e9200a91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Change Log +## [v4.4.2](https://github.com/auth0/nextjs-auth0/tree/v4.4.2) (2025-04-08) +[Full Changelog](https://github.com/auth0/nextjs-auth0/compare/v4.4.1...v4.4.2) + +**Revert** +- revert: fix: Properly configure SDK to be distributed as ESM [\#2046](https://github.com/auth0/nextjs-auth0/pull/2046) ([frederikprijck](https://github.com/frederikprijck)) + +**Fixed** +- fix: Add id_token_hint on logout [\#2041](https://github.com/auth0/nextjs-auth0/pull/2041) ([frederikprijck](https://github.com/frederikprijck)) + ## [v4.4.1](https://github.com/auth0/nextjs-auth0/tree/v4.4.1) (2025-04-03) [Full Changelog](https://github.com/auth0/nextjs-auth0/compare/v4.4.0...v4.4.1) diff --git a/docs/classes/errors.AccessTokenError.html b/docs/classes/errors.AccessTokenError.html index a7016dcba..96bc5a9f5 100644 --- a/docs/classes/errors.AccessTokenError.html +++ b/docs/classes/errors.AccessTokenError.html @@ -1,3 +1,3 @@ -AccessTokenError | @auth0/nextjs-auth0 - v4.4.1

Hierarchy (View Summary)

Constructors

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

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 75a2e0962..935c84895 100644 --- a/docs/classes/errors.AccessTokenForConnectionError.html +++ b/docs/classes/errors.AccessTokenForConnectionError.html @@ -1,11 +1,11 @@ -AccessTokenForConnectionError | @auth0/nextjs-auth0 - v4.4.1

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

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 a9065eaae..cb1977723 100644 --- a/docs/classes/errors.AuthorizationCodeGrantError.html +++ b/docs/classes/errors.AuthorizationCodeGrantError.html @@ -1,4 +1,4 @@ -AuthorizationCodeGrantError | @auth0/nextjs-auth0 - v4.4.1

Hierarchy (View Summary)

Constructors

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

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 482ebcc3d..7bcec813a 100644 --- a/docs/classes/errors.AuthorizationError.html +++ b/docs/classes/errors.AuthorizationError.html @@ -1,4 +1,4 @@ -AuthorizationError | @auth0/nextjs-auth0 - v4.4.1

Hierarchy (View Summary)

Constructors

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

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 86c363781..05e5617cf 100644 --- a/docs/classes/errors.BackchannelLogoutError.html +++ b/docs/classes/errors.BackchannelLogoutError.html @@ -1,3 +1,3 @@ -BackchannelLogoutError | @auth0/nextjs-auth0 - v4.4.1

Hierarchy (View Summary)

Constructors

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

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.ConfigurationError.html b/docs/classes/errors.ConfigurationError.html index 16cad990e..d26e9913c 100644 --- a/docs/classes/errors.ConfigurationError.html +++ b/docs/classes/errors.ConfigurationError.html @@ -1,11 +1,11 @@ -ConfigurationError | @auth0/nextjs-auth0 - v4.4.1

Error class representing a configuration error. +ConfigurationError | @auth0/nextjs-auth0 - v4.4.2

Error class representing a configuration error. Extends the SdkError class.

-

Hierarchy (View Summary)

Constructors

Hierarchy (View Summary)

Constructors

Properties

Constructors

  • Constructs a new ConfigurationError instance.

    Parameters

    • code: string

      The error code.

    • missingOptions: string[] = []

      Array of missing configuration option names.

    • envVarMapping: Record<string, string> = {}

      Optional mapping of option names to their environment variable names.

      -

    Returns ConfigurationError

Properties

code: string

The error code associated with the configuration error.

-
missingOptions?: string[]
+

Returns ConfigurationError

Properties

code: string

The error code associated with the configuration error.

+
missingOptions?: string[]
diff --git a/docs/classes/errors.DiscoveryError.html b/docs/classes/errors.DiscoveryError.html index 58a5304f0..e1b6dde87 100644 --- a/docs/classes/errors.DiscoveryError.html +++ b/docs/classes/errors.DiscoveryError.html @@ -1,3 +1,3 @@ -DiscoveryError | @auth0/nextjs-auth0 - v4.4.1

Hierarchy (View Summary)

Constructors

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

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 032fc788a..e1adb588f 100644 --- a/docs/classes/errors.InvalidStateError.html +++ b/docs/classes/errors.InvalidStateError.html @@ -1,3 +1,3 @@ -InvalidStateError | @auth0/nextjs-auth0 - v4.4.1

Hierarchy (View Summary)

Constructors

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

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 e4a222c6a..f822fd4f7 100644 --- a/docs/classes/errors.MissingStateError.html +++ b/docs/classes/errors.MissingStateError.html @@ -1,3 +1,3 @@ -MissingStateError | @auth0/nextjs-auth0 - v4.4.1

Hierarchy (View Summary)

Constructors

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

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 e9044ec88..8cc12956e 100644 --- a/docs/classes/errors.OAuth2Error.html +++ b/docs/classes/errors.OAuth2Error.html @@ -1,5 +1,5 @@ -OAuth2Error | @auth0/nextjs-auth0 - v4.4.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. +OAuth2Error | @auth0/nextjs-auth0 - v4.4.2

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 b1f2155b3..7bab3184e 100644 --- a/docs/classes/errors.SdkError.html +++ b/docs/classes/errors.SdkError.html @@ -1,3 +1,3 @@ -SdkError | @auth0/nextjs-auth0 - v4.4.1

Class SdkErrorAbstract

Hierarchy (View Summary)

Constructors

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

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 4d9597d7c..b9ef52ad6 100644 --- a/docs/classes/server.AbstractSessionStore.html +++ b/docs/classes/server.AbstractSessionStore.html @@ -1,4 +1,4 @@ -AbstractSessionStore | @auth0/nextjs-auth0 - v4.4.1

Class AbstractSessionStoreAbstract

Constructors

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

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 f7eeb00b5..04fee5b37 100644 --- a/docs/classes/server.Auth0Client.html +++ b/docs/classes/server.Auth0Client.html @@ -1,29 +1,29 @@ -Auth0Client | @auth0/nextjs-auth0 - v4.4.1

Constructors

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

Constructors

Methods

  • getAccessToken returns the access token.

    +

Constructors

Methods

  • getAccessToken returns the access token.

    This method can be used in Server Components, Server Actions, and Route Handlers in the App Router.

    NOTE: Server Components cannot set cookies. Calling getAccessToken() in a Server Component will cause the access token to be refreshed, if it is expired, and the updated token set will not to be persisted. It is recommended to call getAccessToken(req, res) in the middleware if you need to retrieve the access token in a Server Component to ensure the updated token set is persisted.

    -

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

  • getAccessToken returns the access token.

    +

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

  • getAccessToken returns the access token.

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

    -

    Parameters

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

  • Retrieves an access token for a connection.

    This method can be used in Server Components, Server Actions, and Route Handlers in the App Router.

    NOTE: Server Components cannot set cookies. Calling getAccessTokenForConnection() in a Server Component will cause the access token to be refreshed, if it is expired, and the updated token set will not to be persisted. It is recommended to call getAccessTokenForConnection(req, res) in the middleware if you need to retrieve the access token in a Server Component to ensure the updated token set is persisted.

    -

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

  • Retrieves an access token for a connection.

    +

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

  • Retrieves an access token for a connection.

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

    -

    Parameters

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

  • middleware mounts the SDK routes to run as a middleware function.

    -

    Parameters

    • req: NextRequest

    Returns Promise<NextResponse<unknown>>

  • middleware mounts the SDK routes to run as a middleware function.

    +

    Parameters

    • req: NextRequest

    Returns Promise<NextResponse<unknown>>

  • updateSession updates the session of the currently authenticated user. If the user does not have a session, an error is thrown.

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

    -

    Parameters

    Returns Promise<void>

  • updateSession updates the session of the currently authenticated user. If the user does not have a session, an error is thrown.

    +

    Parameters

    Returns Promise<void>

  • updateSession updates the session of the currently authenticated user. If the user does not have a session, an error is thrown.

    This method can be used in Server Actions and Route Handlers in the App Router.

    -

    Parameters

    Returns Promise<void>

+

Parameters

Returns Promise<void>

diff --git a/docs/classes/server.AuthClient.html b/docs/classes/server.AuthClient.html index 56fd0c30e..f9a210d84 100644 --- a/docs/classes/server.AuthClient.html +++ b/docs/classes/server.AuthClient.html @@ -1,4 +1,4 @@ -AuthClient | @auth0/nextjs-auth0 - v4.4.1

Constructors

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

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 02ec97870..93b967067 100644 --- a/docs/classes/server.TransactionStore.html +++ b/docs/classes/server.TransactionStore.html @@ -1,8 +1,8 @@ -TransactionStore | @auth0/nextjs-auth0 - v4.4.1

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

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 038c785b3..c5f6368d8 100644 --- a/docs/enums/errors.AccessTokenErrorCode.html +++ b/docs/enums/errors.AccessTokenErrorCode.html @@ -1,4 +1,4 @@ -AccessTokenErrorCode | @auth0/nextjs-auth0 - v4.4.1

Enumeration AccessTokenErrorCode

Enumeration Members

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

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 65508fa8a..ba7c4c186 100644 --- a/docs/enums/errors.AccessTokenForConnectionErrorCode.html +++ b/docs/enums/errors.AccessTokenForConnectionErrorCode.html @@ -1,8 +1,8 @@ -AccessTokenForConnectionErrorCode | @auth0/nextjs-auth0 - v4.4.1

Enumeration AccessTokenForConnectionErrorCode

Enum representing error codes related to access tokens for connections.

-

Enumeration Members

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

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/enums/errors.ConfigurationErrorCode.html b/docs/enums/errors.ConfigurationErrorCode.html index c6e22391c..8990497fc 100644 --- a/docs/enums/errors.ConfigurationErrorCode.html +++ b/docs/enums/errors.ConfigurationErrorCode.html @@ -1,4 +1,4 @@ -ConfigurationErrorCode | @auth0/nextjs-auth0 - v4.4.1

Enumeration ConfigurationErrorCode

Enum representing error codes related to configuration.

-

Enumeration Members

MISSING_REQUIRED_OPTIONS +ConfigurationErrorCode | @auth0/nextjs-auth0 - v4.4.2

Enumeration ConfigurationErrorCode

Enum representing error codes related to configuration.

+

Enumeration Members

Enumeration Members

MISSING_REQUIRED_OPTIONS: "missing_required_options"

Missing required configuration options.

-
+
diff --git a/docs/functions/client.Auth0Provider.html b/docs/functions/client.Auth0Provider.html index 9e4443cb2..ddf99ba2f 100644 --- a/docs/functions/client.Auth0Provider.html +++ b/docs/functions/client.Auth0Provider.html @@ -1 +1 @@ -Auth0Provider | @auth0/nextjs-auth0 - v4.4.1
+Auth0Provider | @auth0/nextjs-auth0 - v4.4.2
diff --git a/docs/functions/client.getAccessToken.html b/docs/functions/client.getAccessToken.html index a787f8c75..9fb20521b 100644 --- a/docs/functions/client.getAccessToken.html +++ b/docs/functions/client.getAccessToken.html @@ -1 +1 @@ -getAccessToken | @auth0/nextjs-auth0 - v4.4.1
+getAccessToken | @auth0/nextjs-auth0 - v4.4.2
diff --git a/docs/functions/client.useUser.html b/docs/functions/client.useUser.html index 30473add1..eab712d5b 100644 --- a/docs/functions/client.useUser.html +++ b/docs/functions/client.useUser.html @@ -1 +1 @@ -useUser | @auth0/nextjs-auth0 - v4.4.1
  • Returns
        | { error: null; isLoading: boolean; user: User }
        | { error: Error; isLoading: boolean; user: null }
        | { error: undefined; isLoading: boolean; user: undefined }

+useUser | @auth0/nextjs-auth0 - v4.4.2
  • Returns
        | { error: null; isLoading: boolean; user: User }
        | { error: Error; isLoading: boolean; user: null }
        | { error: undefined; isLoading: boolean; user: undefined }

diff --git a/docs/functions/testing.generateSessionCookie.html b/docs/functions/testing.generateSessionCookie.html index c308c575e..800c03e32 100644 --- a/docs/functions/testing.generateSessionCookie.html +++ b/docs/functions/testing.generateSessionCookie.html @@ -1 +1 @@ -generateSessionCookie | @auth0/nextjs-auth0 - v4.4.1
+generateSessionCookie | @auth0/nextjs-auth0 - v4.4.2
diff --git a/docs/hierarchy.html b/docs/hierarchy.html index 823d3b015..2309040c2 100644 --- a/docs/hierarchy.html +++ b/docs/hierarchy.html @@ -1 +1 @@ -@auth0/nextjs-auth0 - v4.4.1

@auth0/nextjs-auth0 - v4.4.1

Hierarchy Summary

+@auth0/nextjs-auth0 - v4.4.2

@auth0/nextjs-auth0 - v4.4.2

Hierarchy Summary

diff --git a/docs/index.html b/docs/index.html index 5e781726a..c0e164ab9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,8 +1,8 @@ -@auth0/nextjs-auth0 - v4.4.1

@auth0/nextjs-auth0 - v4.4.1

nextjs-auth0

+@auth0/nextjs-auth0 - v4.4.2

@auth0/nextjs-auth0 - v4.4.2

Auth0 Next.js SDK Banner

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

-

Release -Downloads -License

+

Auth0 Next.js SDK Release +Auth0 Next.js SDK Downloads +Auth0 Next.js SDK License

📚 Documentation - 🚀 Getting Started - 💻 API Reference - 💬 Feedback

  • QuickStart- our guide for adding Auth0 to your Next.js app.
  • @@ -198,4 +198,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 4eae2d6d2..868dc5d27 100644 --- a/docs/interfaces/types.AccessTokenForConnectionOptions.html +++ b/docs/interfaces/types.AccessTokenForConnectionOptions.html @@ -1,6 +1,6 @@ -AccessTokenForConnectionOptions | @auth0/nextjs-auth0 - v4.4.1

Interface AccessTokenForConnectionOptions

Options for retrieving a connection access token.

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

Properties

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

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 ab830df3b..6a3b9ca9f 100644 --- a/docs/interfaces/types.Auth0ClientOptions.html +++ b/docs/interfaces/types.Auth0ClientOptions.html @@ -1,4 +1,4 @@ -Auth0ClientOptions | @auth0/nextjs-auth0 - v4.4.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? +Auth0ClientOptions | @auth0/nextjs-auth0 - v4.4.2

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 19b8ae240..2d69a3b07 100644 --- a/docs/interfaces/types.AuthClientOptions.html +++ b/docs/interfaces/types.AuthClientOptions.html @@ -1,4 +1,4 @@ -AuthClientOptions | @auth0/nextjs-auth0 - v4.4.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? +AuthClientOptions | @auth0/nextjs-auth0 - v4.4.2
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 be05031a7..f8680524f 100644 --- a/docs/interfaces/types.AuthorizationParameters.html +++ b/docs/interfaces/types.AuthorizationParameters.html @@ -1,11 +1,11 @@ -AuthorizationParameters | @auth0/nextjs-auth0 - v4.4.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? +AuthorizationParameters | @auth0/nextjs-auth0 - v4.4.2

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 1ed08364c..ab4301ece 100644 --- a/docs/interfaces/types.ConnectionTokenSet.html +++ b/docs/interfaces/types.ConnectionTokenSet.html @@ -1,5 +1,5 @@ -ConnectionTokenSet | @auth0/nextjs-auth0 - v4.4.1

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.4.2

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 84ee8702f..6ad60a5ae 100644 --- a/docs/interfaces/types.CookieOptions.html +++ b/docs/interfaces/types.CookieOptions.html @@ -1,6 +1,6 @@ -CookieOptions | @auth0/nextjs-auth0 - v4.4.1
interface CookieOptions {
    httpOnly: boolean;
    maxAge?: number;
    path: string;
    sameSite: "lax" | "strict" | "none";
    secure: boolean;
}

Properties

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

Properties

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

Properties

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

Properties

accessToken +Routes | @auth0/nextjs-auth0 - v4.4.2
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 e6de91907..b1e78f973 100644 --- a/docs/interfaces/types.SessionConfiguration.html +++ b/docs/interfaces/types.SessionConfiguration.html @@ -1,16 +1,16 @@ -SessionConfiguration | @auth0/nextjs-auth0 - v4.4.1

Interface SessionConfiguration

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

Hierarchy (View Summary)

Properties

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

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 2ebd0a265..1d0601cf2 100644 --- a/docs/interfaces/types.SessionCookieOptions.html +++ b/docs/interfaces/types.SessionCookieOptions.html @@ -1,10 +1,10 @@ -SessionCookieOptions | @auth0/nextjs-auth0 - v4.4.1

Interface SessionCookieOptions

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

Properties

name? +SessionCookieOptions | @auth0/nextjs-auth0 - v4.4.2

Interface SessionCookieOptions

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

Properties

name?: string

The name of the session cookie.

Default: __session.

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

The sameSite attribute of the session cookie.

+
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.

-
+
diff --git a/docs/interfaces/types.SessionData.html b/docs/interfaces/types.SessionData.html index 53336705b..1651146dc 100644 --- a/docs/interfaces/types.SessionData.html +++ b/docs/interfaces/types.SessionData.html @@ -1,5 +1,5 @@ -SessionData | @auth0/nextjs-auth0 - v4.4.1
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.4.2
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 ae6077687..e2ec1d514 100644 --- a/docs/interfaces/types.SessionDataStore.html +++ b/docs/interfaces/types.SessionDataStore.html @@ -1,9 +1,9 @@ -SessionDataStore | @auth0/nextjs-auth0 - v4.4.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

delete +SessionDataStore | @auth0/nextjs-auth0 - v4.4.2
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 ae51e6a6e..1c73f9f82 100644 --- a/docs/interfaces/types.SessionStoreOptions.html +++ b/docs/interfaces/types.SessionStoreOptions.html @@ -1,4 +1,4 @@ -SessionStoreOptions | @auth0/nextjs-auth0 - v4.4.1

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.4.2

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 ffbdb7396..a8ddf0837 100644 --- a/docs/interfaces/types.StartInteractiveLoginOptions.html +++ b/docs/interfaces/types.StartInteractiveLoginOptions.html @@ -1,5 +1,5 @@ -StartInteractiveLoginOptions | @auth0/nextjs-auth0 - v4.4.1

Interface StartInteractiveLoginOptions

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

Properties

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

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 69622c690..8fd2b12e3 100644 --- a/docs/interfaces/types.TokenSet.html +++ b/docs/interfaces/types.TokenSet.html @@ -1,6 +1,6 @@ -TokenSet | @auth0/nextjs-auth0 - v4.4.1
interface TokenSet {
    accessToken: string;
    expiresAt: number;
    idToken?: string;
    refreshToken?: string;
    scope?: string;
}

Properties

accessToken +TokenSet | @auth0/nextjs-auth0 - v4.4.2
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 727fde04a..17c2f750f 100644 --- a/docs/interfaces/types.TransactionCookieOptions.html +++ b/docs/interfaces/types.TransactionCookieOptions.html @@ -1,10 +1,10 @@ -TransactionCookieOptions | @auth0/nextjs-auth0 - v4.4.1

Interface TransactionCookieOptions

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

Properties

prefix? +TransactionCookieOptions | @auth0/nextjs-auth0 - v4.4.2

Interface TransactionCookieOptions

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

Properties

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 15e7be23a..e442633ec 100644 --- a/docs/interfaces/types.TransactionState.html +++ b/docs/interfaces/types.TransactionState.html @@ -1,8 +1,8 @@ -TransactionState | @auth0/nextjs-auth0 - v4.4.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 +TransactionState | @auth0/nextjs-auth0 - v4.4.2
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 e1ac34503..99f9129d9 100644 --- a/docs/interfaces/types.TransactionStoreOptions.html +++ b/docs/interfaces/types.TransactionStoreOptions.html @@ -1,3 +1,3 @@ -TransactionStoreOptions | @auth0/nextjs-auth0 - v4.4.1

Interface TransactionStoreOptions

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

Properties

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

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 7dd2adfee..50afef32c 100644 --- a/docs/interfaces/types.User.html +++ b/docs/interfaces/types.User.html @@ -1,4 +1,4 @@ -User | @auth0/nextjs-auth0 - v4.4.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? +User | @auth0/nextjs-auth0 - v4.4.2
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 62ee9fa0a..5846eeaed 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -1 +1 @@ -@auth0/nextjs-auth0 - v4.4.1

@auth0/nextjs-auth0 - v4.4.1

Modules

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

@auth0/nextjs-auth0 - v4.4.2

Modules

client
errors
server
testing
types
diff --git a/docs/modules/client.html b/docs/modules/client.html index 72e0090fb..8a653220f 100644 --- a/docs/modules/client.html +++ b/docs/modules/client.html @@ -1 +1 @@ -client | @auth0/nextjs-auth0 - v4.4.1

Functions

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

Functions

Auth0Provider
getAccessToken
useUser
diff --git a/docs/modules/errors.html b/docs/modules/errors.html index 60a72b39e..185d314b1 100644 --- a/docs/modules/errors.html +++ b/docs/modules/errors.html @@ -1 +1 @@ -errors | @auth0/nextjs-auth0 - v4.4.1

Enumerations

AccessTokenErrorCode
AccessTokenForConnectionErrorCode
ConfigurationErrorCode

Classes

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

Enumerations

AccessTokenErrorCode
AccessTokenForConnectionErrorCode
ConfigurationErrorCode

Classes

AccessTokenError
AccessTokenForConnectionError
AuthorizationCodeGrantError
AuthorizationError
BackchannelLogoutError
ConfigurationError
DiscoveryError
InvalidStateError
MissingStateError
OAuth2Error
SdkError
diff --git a/docs/modules/server.html b/docs/modules/server.html index 4d7e351e6..56255fee1 100644 --- a/docs/modules/server.html +++ b/docs/modules/server.html @@ -1 +1 @@ -server | @auth0/nextjs-auth0 - v4.4.1

Classes

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

Classes

AbstractSessionStore
Auth0Client
AuthClient
TransactionStore
diff --git a/docs/modules/testing.html b/docs/modules/testing.html index 7625b9499..34c82a225 100644 --- a/docs/modules/testing.html +++ b/docs/modules/testing.html @@ -1 +1 @@ -testing | @auth0/nextjs-auth0 - v4.4.1

Type Aliases

GenerateSessionCookieConfig

Functions

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

Type Aliases

GenerateSessionCookieConfig

Functions

generateSessionCookie
diff --git a/docs/modules/types.html b/docs/modules/types.html index 230d2926b..0d4cbd3c9 100644 --- a/docs/modules/types.html +++ b/docs/modules/types.html @@ -1 +1 @@ -types | @auth0/nextjs-auth0 - v4.4.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
+types | @auth0/nextjs-auth0 - v4.4.2

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 e4223b668..017fd4630 100644 --- a/docs/types/testing.GenerateSessionCookieConfig.html +++ b/docs/types/testing.GenerateSessionCookieConfig.html @@ -1,3 +1,3 @@ -GenerateSessionCookieConfig | @auth0/nextjs-auth0 - v4.4.1

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.4.2

    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 b14c1affa..fb5ebd006 100644 --- a/docs/types/types.BeforeSessionSavedHook.html +++ b/docs/types/types.BeforeSessionSavedHook.html @@ -1 +1 @@ -BeforeSessionSavedHook | @auth0/nextjs-auth0 - v4.4.1

Type Alias BeforeSessionSavedHook

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

Type declaration

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

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 4fc738129..3d9f9b50c 100644 --- a/docs/types/types.LogoutToken.html +++ b/docs/types/types.LogoutToken.html @@ -1 +1 @@ -LogoutToken | @auth0/nextjs-auth0 - v4.4.1
LogoutToken: { sid?: string; sub?: string }

Type declaration

  • Optionalsid?: string
  • Optionalsub?: string
+LogoutToken | @auth0/nextjs-auth0 - v4.4.2
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 26e546097..7be8be44a 100644 --- a/docs/types/types.OnCallbackContext.html +++ b/docs/types/types.OnCallbackContext.html @@ -1 +1 @@ -OnCallbackContext | @auth0/nextjs-auth0 - v4.4.1

Type Alias OnCallbackContext

OnCallbackContext: { returnTo?: string }

Type declaration

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

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 7f4ba573d..9c0204662 100644 --- a/docs/types/types.OnCallbackHook.html +++ b/docs/types/types.OnCallbackHook.html @@ -1 +1 @@ -OnCallbackHook | @auth0/nextjs-auth0 - v4.4.1
OnCallbackHook: (
    error: SdkError | null,
    ctx: OnCallbackContext,
    session: SessionData | null,
) => Promise<NextResponse>

Type declaration

+OnCallbackHook | @auth0/nextjs-auth0 - v4.4.2
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 a25b9f674..2c26c9878 100644 --- a/docs/types/types.PagesRouterRequest.html +++ b/docs/types/types.PagesRouterRequest.html @@ -1 +1 @@ -PagesRouterRequest | @auth0/nextjs-auth0 - v4.4.1

Type Alias PagesRouterRequest

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

Type Alias PagesRouterRequest

PagesRouterRequest: IncomingMessage | NextApiRequest
diff --git a/docs/types/types.PagesRouterResponse.html b/docs/types/types.PagesRouterResponse.html index e63a6c8f8..981574f05 100644 --- a/docs/types/types.PagesRouterResponse.html +++ b/docs/types/types.PagesRouterResponse.html @@ -1 +1 @@ -PagesRouterResponse | @auth0/nextjs-auth0 - v4.4.1

Type Alias PagesRouterResponse

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

Type Alias PagesRouterResponse

PagesRouterResponse: ServerResponse<IncomingMessage> | NextApiResponse
diff --git a/docs/types/types.ReadonlyRequestCookies.html b/docs/types/types.ReadonlyRequestCookies.html index f08bf763d..82fe00b0d 100644 --- a/docs/types/types.ReadonlyRequestCookies.html +++ b/docs/types/types.ReadonlyRequestCookies.html @@ -1 +1 @@ -ReadonlyRequestCookies | @auth0/nextjs-auth0 - v4.4.1

Type Alias ReadonlyRequestCookies

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

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 9068b9e7c..2714b1459 100644 --- a/docs/types/types.RoutesOptions.html +++ b/docs/types/types.RoutesOptions.html @@ -1 +1 @@ -RoutesOptions | @auth0/nextjs-auth0 - v4.4.1
RoutesOptions: Partial<
    Pick<Routes, "login" | "callback" | "logout" | "backChannelLogout">,
>
+RoutesOptions | @auth0/nextjs-auth0 - v4.4.2
RoutesOptions: Partial<
    Pick<Routes, "login" | "callback" | "logout" | "backChannelLogout">,
>
diff --git a/package.json b/package.json index 35209291a..c25fbb07f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@auth0/nextjs-auth0", - "version": "4.4.1", + "version": "4.4.2", "description": "Auth0 Next.js SDK", "scripts": { "build": "tsc",