From 6392061504d76f61ee969988fc67b28da897b802 Mon Sep 17 00:00:00 2001 From: Yogesh Chaudhary Date: Fri, 13 Feb 2026 10:27:24 +0530 Subject: [PATCH] Release v2.14.0 --- .version | 2 +- CHANGELOG.md | 6 ++++ docs/classes/OAuthError.html | 4 +-- docs/functions/Auth0Provider.html | 2 +- docs/functions/useAuth0.html | 2 +- docs/functions/withAuth0.html | 2 +- .../functions/withAuthenticationRequired.html | 2 +- docs/interfaces/Auth0ContextInterface.html | 32 +++++++++---------- docs/interfaces/Auth0ProviderOptions.html | 10 +++--- docs/interfaces/LogoutOptions.html | 2 +- docs/interfaces/RedirectLoginOptions.html | 2 +- docs/interfaces/WithAuth0Props.html | 4 +-- .../WithAuthenticationRequiredOptions.html | 12 +++---- docs/types/AppState.html | 4 +-- docs/types/ConnectedAccount.html | 2 +- docs/variables/Auth0Context.html | 2 +- package-lock.json | 4 +-- package.json | 2 +- 18 files changed, 51 insertions(+), 45 deletions(-) diff --git a/.version b/.version index 311f78b6..ff76dbc5 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -v2.13.0 \ No newline at end of file +v2.14.0 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 53da4384..a3c887df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## [v2.14.0](https://github.com/auth0/auth0-react/tree/v2.14.0) (2026-02-13) +[Full Changelog](https://github.com/auth0/auth0-react/compare/v2.13.0...v2.14.0) + +**Changed** +- chore: bump @auth0/auth0-spa-js to v2.15.0 [\#1017](https://github.com/auth0/auth0-react/pull/1017) ([yogeshchoudhary147](https://github.com/yogeshchoudhary147)) + ## [v2.13.0](https://github.com/auth0/auth0-react/tree/v2.13.0) (2026-02-05) [Full Changelog](https://github.com/auth0/auth0-react/compare/v2.12.0...v2.13.0) diff --git a/docs/classes/OAuthError.html b/docs/classes/OAuthError.html index a5e96d1b..81791ea2 100644 --- a/docs/classes/OAuthError.html +++ b/docs/classes/OAuthError.html @@ -1,7 +1,7 @@ OAuthError | @auth0/auth0-react
@auth0/auth0-react
    Preparing search index...

    Class OAuthError

    An OAuth2 error will come from the authorization server and will have at least an error property which will be the error code. And possibly an error_description property

    See: https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.3.1.2.6

    -

    Hierarchy

    • Error
      • OAuthError
    Index

    Constructors

    Hierarchy

    • Error
      • OAuthError
    Index

    Constructors

    • Parameters

      • error: string
      • Optionalerror_description: string

      Returns OAuthError

    Properties

    error: string
    error_description?: string
    message: string
    name: string
    stack?: string
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Optional override for formatting stack traces

    +

    Constructors

    • Parameters

      • error: string
      • Optionalerror_description: string

      Returns OAuthError

    Properties

    error: string
    error_description?: string
    message: string
    name: string
    stack?: string
    prepareStackTrace?: (err: Error, stackTraces: CallSite[]) => any

    Optional override for formatting stack traces

    stackTraceLimit: number

    Methods

    • Create .stack property on a target object

      Parameters

      • targetObject: object
      • OptionalconstructorOpt: Function

      Returns void

    diff --git a/docs/functions/Auth0Provider.html b/docs/functions/Auth0Provider.html index 52acca24..e96aa6b8 100644 --- a/docs/functions/Auth0Provider.html +++ b/docs/functions/Auth0Provider.html @@ -2,4 +2,4 @@

    Provides the Auth0Context to its child components.

    -

    Type Parameters

    Parameters

    Returns Element

    +

    Type Parameters

    Parameters

    Returns Element

    diff --git a/docs/functions/useAuth0.html b/docs/functions/useAuth0.html index ecb94dc5..672f8fd3 100644 --- a/docs/functions/useAuth0.html +++ b/docs/functions/useAuth0.html @@ -3,4 +3,4 @@

    Use the useAuth0 hook in your components to access the auth state and methods.

    TUser is an optional type param to provide a type to the user field.

    -

    Type Parameters

    Parameters

    Returns Auth0ContextInterface<TUser>

    +

    Type Parameters

    Parameters

    Returns Auth0ContextInterface<TUser>

    diff --git a/docs/functions/withAuth0.html b/docs/functions/withAuth0.html index b33f500c..d05a7197 100644 --- a/docs/functions/withAuth0.html +++ b/docs/functions/withAuth0.html @@ -4,4 +4,4 @@

    Wrap your class components in this Higher Order Component to give them access to the Auth0Context.

    Providing a context as the second argument allows you to configure the Auth0Provider the Auth0Context should come from f you have multiple within your application.

    -

    Type Parameters

    Parameters

    Returns ComponentType<Omit<P, "auth0">>

    +

    Type Parameters

    Parameters

    Returns ComponentType<Omit<P, "auth0">>

    diff --git a/docs/functions/withAuthenticationRequired.html b/docs/functions/withAuthenticationRequired.html index b665934b..6640beed 100644 --- a/docs/functions/withAuthenticationRequired.html +++ b/docs/functions/withAuthenticationRequired.html @@ -3,4 +3,4 @@

    When you wrap your components in this Higher Order Component and an anonymous user visits your component they will be redirected to the login page; after login they will be returned to the page they were redirected from.

    -

    Type Parameters

    Parameters

    Returns FC<P>

    +

    Type Parameters

    Parameters

    Returns FC<P>

    diff --git a/docs/interfaces/Auth0ContextInterface.html b/docs/interfaces/Auth0ContextInterface.html index ca01ee2b..a617bd7e 100644 --- a/docs/interfaces/Auth0ContextInterface.html +++ b/docs/interfaces/Auth0ContextInterface.html @@ -1,5 +1,5 @@ Auth0ContextInterface | @auth0/auth0-react
    @auth0/auth0-react
      Preparing search index...

      Interface Auth0ContextInterface<TUser>

      Contains the authenticated state and authentication methods provided by the useAuth0 hook.

      -
      interface Auth0ContextInterface<TUser extends User = User> {
          connectAccountWithRedirect: (
              options: RedirectConnectAccountOptions,
          ) => Promise<void>;
          createFetcher: <TOutput extends CustomFetchMinimalOutput = Response>(
              config?: FetcherConfig<TOutput>,
          ) => Fetcher<TOutput>;
          error: Error | undefined;
          exchangeToken: (
              options: CustomTokenExchangeOptions,
          ) => Promise<TokenEndpointResponse>;
          generateDpopProof: (
              params: {
                  accessToken: string;
                  method: string;
                  nonce?: string;
                  url: string;
              },
          ) => Promise<string>;
          getAccessTokenSilently: {
              (
                  options: GetTokenSilentlyOptions & { detailedResponse: true },
              ): Promise<GetTokenSilentlyVerboseResponse>;
              (options?: GetTokenSilentlyOptions): Promise<string>;
              (
                  options: GetTokenSilentlyOptions,
              ): Promise<string | GetTokenSilentlyVerboseResponse>;
          };
          getAccessTokenWithPopup: (
              options?: GetTokenWithPopupOptions,
              config?: PopupConfigOptions,
          ) => Promise<string | undefined>;
          getConfiguration: () => Readonly<ClientConfiguration>;
          getDpopNonce: (id?: string) => Promise<string | undefined>;
          getIdTokenClaims: () => Promise<IdToken | undefined>;
          handleRedirectCallback: (
              url?: string,
          ) => Promise<ConnectAccountRedirectResult | RedirectLoginResult<any>>;
          isAuthenticated: boolean;
          isLoading: boolean;
          loginWithCustomTokenExchange: (
              options: CustomTokenExchangeOptions,
          ) => Promise<TokenEndpointResponse>;
          loginWithPopup: (
              options?: PopupLoginOptions,
              config?: PopupConfigOptions,
          ) => Promise<void>;
          loginWithRedirect: (
              options?: RedirectLoginOptions<AppState>,
          ) => Promise<void>;
          logout: (options?: LogoutOptions) => Promise<void>;
          setDpopNonce: (nonce: string, id?: string) => Promise<void>;
          user: TUser | undefined;
      }

      Type Parameters

      Hierarchy

      • AuthState<TUser>
        • Auth0ContextInterface
      Index

      Properties

      interface Auth0ContextInterface<TUser extends User = User> {
          connectAccountWithRedirect: (
              options: RedirectConnectAccountOptions,
          ) => Promise<void>;
          createFetcher: <TOutput extends CustomFetchMinimalOutput = Response>(
              config?: FetcherConfig<TOutput>,
          ) => Fetcher<TOutput>;
          error: Error | undefined;
          exchangeToken: (
              options: CustomTokenExchangeOptions,
          ) => Promise<TokenEndpointResponse>;
          generateDpopProof: (
              params: {
                  accessToken: string;
                  method: string;
                  nonce?: string;
                  url: string;
              },
          ) => Promise<string>;
          getAccessTokenSilently: {
              (
                  options: GetTokenSilentlyOptions & { detailedResponse: true },
              ): Promise<GetTokenSilentlyVerboseResponse>;
              (options?: GetTokenSilentlyOptions): Promise<string>;
              (
                  options: GetTokenSilentlyOptions,
              ): Promise<string | GetTokenSilentlyVerboseResponse>;
          };
          getAccessTokenWithPopup: (
              options?: GetTokenWithPopupOptions,
              config?: PopupConfigOptions,
          ) => Promise<string | undefined>;
          getConfiguration: () => Readonly<ClientConfiguration>;
          getDpopNonce: (id?: string) => Promise<string | undefined>;
          getIdTokenClaims: () => Promise<IdToken | undefined>;
          handleRedirectCallback: (
              url?: string,
          ) => Promise<ConnectAccountRedirectResult | RedirectLoginResult<any>>;
          isAuthenticated: boolean;
          isLoading: boolean;
          loginWithCustomTokenExchange: (
              options: CustomTokenExchangeOptions,
          ) => Promise<TokenEndpointResponse>;
          loginWithPopup: (
              options?: PopupLoginOptions,
              config?: PopupConfigOptions,
          ) => Promise<void>;
          loginWithRedirect: (
              options?: RedirectLoginOptions<AppState>,
          ) => Promise<void>;
          logout: (options?: LogoutOptions) => Promise<void>;
          setDpopNonce: (nonce: string, id?: string) => Promise<void>;
          user: TUser | undefined;
      }

      Type Parameters

      Hierarchy

      • AuthState<TUser>
        • Auth0ContextInterface
      Index

      Properties

      connectAccountWithRedirect createFetcher error exchangeToken @@ -26,7 +26,7 @@ where the user can authenticate and authorize the account to be connected.

      If connecting the account is successful onRedirectCallback will be called with the details of the connected account.

      -
      createFetcher: <TOutput extends CustomFetchMinimalOutput = Response>(
          config?: FetcherConfig<TOutput>,
      ) => Fetcher<TOutput>

      Returns a new Fetcher class that will contain a fetchWithAuth() method. +

      createFetcher: <TOutput extends CustomFetchMinimalOutput = Response>(
          config?: FetcherConfig<TOutput>,
      ) => Fetcher<TOutput>

      Returns a new Fetcher class that will contain a fetchWithAuth() method. This is a drop-in replacement for the Fetch API's fetch() method, but will handle certain authentication logic for you, like building the proper auth headers or managing DPoP nonces and retries automatically.

      @@ -36,7 +36,7 @@ handle certain authentication logic for you, like building the proper auth headers or managing DPoP nonces and retries automatically.

      Check the EXAMPLES.md file for a deeper look into this method.

      -

      Type Parameters

      • TOutput extends CustomFetchMinimalOutput = Response

      Parameters

      Returns Fetcher<TOutput>

      error: Error | undefined
      exchangeToken: (
          options: CustomTokenExchangeOptions,
      ) => Promise<TokenEndpointResponse>

      Type Declaration

      error: Error | undefined
      exchangeToken: (
          options: CustomTokenExchangeOptions,
      ) => Promise<TokenEndpointResponse>

      Type Declaration

      Use loginWithCustomTokenExchange() instead. This method will be removed in the next major version.

      const tokenResponse = await exchangeToken({
      subject_token: 'external_token_value',
      subject_token_type: 'urn:acme:legacy-system-token',
      scope: 'openid profile email'
      }); @@ -50,13 +50,13 @@
      // Instead of:
      const tokens = await exchangeToken(options);

      // Use:
      const tokens = await loginWithCustomTokenExchange(options);
      -
      generateDpopProof: (
          params: {
              accessToken: string;
              method: string;
              nonce?: string;
              url: string;
          },
      ) => Promise<string>

      Returns a string to be used to demonstrate possession of the private +

      generateDpopProof: (
          params: {
              accessToken: string;
              method: string;
              nonce?: string;
              url: string;
          },
      ) => Promise<string>

      Returns a string to be used to demonstrate possession of the private key used to cryptographically bind access tokens with DPoP.

      It requires enabling the Auth0ClientOptions.useDpop option.

      Type Declaration

        • (
              params: {
                  accessToken: string;
                  method: string;
                  nonce?: string;
                  url: string;
              },
          ): Promise<string>
        • Returns a string to be used to demonstrate possession of the private key used to cryptographically bind access tokens with DPoP.

          It requires enabling the Auth0ClientOptions.useDpop option.

          -

          Parameters

          • params: { accessToken: string; method: string; nonce?: string; url: string }

          Returns Promise<string>

      getAccessTokenSilently: {
          (
              options: GetTokenSilentlyOptions & { detailedResponse: true },
          ): Promise<GetTokenSilentlyVerboseResponse>;
          (options?: GetTokenSilentlyOptions): Promise<string>;
          (
              options: GetTokenSilentlyOptions,
          ): Promise<string | GetTokenSilentlyVerboseResponse>;
      }
      const token = await getAccessTokenSilently(options);
      +

      Parameters

      • params: { accessToken: string; method: string; nonce?: string; url: string }

      Returns Promise<string>

      getAccessTokenSilently: {
          (
              options: GetTokenSilentlyOptions & { detailedResponse: true },
          ): Promise<GetTokenSilentlyVerboseResponse>;
          (options?: GetTokenSilentlyOptions): Promise<string>;
          (
              options: GetTokenSilentlyOptions,
          ): Promise<string | GetTokenSilentlyVerboseResponse>;
      }
      const token = await getAccessTokenSilently(options);
       

      If there's a valid token stored, return it. Otherwise, opens an @@ -75,7 +75,7 @@ back to using an iframe to make the token exchange.

      Note that in all cases, falling back to an iframe requires access to the auth0 cookie.

      -
      getAccessTokenWithPopup: (
          options?: GetTokenWithPopupOptions,
          config?: PopupConfigOptions,
      ) => Promise<string | undefined>
      const token = await getTokenWithPopup(options, config);
      +
      getAccessTokenWithPopup: (
          options?: GetTokenWithPopupOptions,
          config?: PopupConfigOptions,
      ) => Promise<string | undefined>
      const token = await getTokenWithPopup(options, config);
       

      Get an access token interactively.

      @@ -83,7 +83,7 @@ provided as arguments. Random and secure state and nonce parameters will be auto-generated. If the response is successful, results will be valid according to their expiration times.

      -
      getConfiguration: () => Readonly<ClientConfiguration>
      const config = getConfiguration();
      // { domain: 'tenant.auth0.com', clientId: 'abc123' } +
      getConfiguration: () => Readonly<ClientConfiguration>
      const config = getConfiguration();
      // { domain: 'tenant.auth0.com', clientId: 'abc123' }

      Returns a readonly copy of the initialization configuration @@ -93,7 +93,7 @@

      const auth0 = new Auth0Client({
      domain: 'tenant.auth0.com',
      clientId: 'abc123'
      });

      const config = auth0.getConfiguration();
      // { domain: 'tenant.auth0.com', clientId: 'abc123' }
      -
      getDpopNonce: (id?: string) => Promise<string | undefined>

      Returns the current DPoP nonce used for making requests to Auth0.

      +
      getDpopNonce: (id?: string) => Promise<string | undefined>

      Returns the current DPoP nonce used for making requests to Auth0.

      It can return undefined because when starting fresh it will not be populated until after the first response from the server.

      It requires enabling the Auth0ClientOptions.useDpop option.

      @@ -108,16 +108,16 @@

      The identifier of a nonce: if absent, it will get the nonce used for requests to Auth0. Otherwise, it will be used to select a specific non-Auth0 nonce.

      -
      getIdTokenClaims: () => Promise<IdToken | undefined>
      const claims = await getIdTokenClaims();
      +
      getIdTokenClaims: () => Promise<IdToken | undefined>
      const claims = await getIdTokenClaims();
       

      Returns all claims from the id_token if available.

      -
      handleRedirectCallback: (
          url?: string,
      ) => Promise<ConnectAccountRedirectResult | RedirectLoginResult<any>>

      After the browser redirects back to the callback page, +

      handleRedirectCallback: (
          url?: string,
      ) => Promise<ConnectAccountRedirectResult | RedirectLoginResult<any>>

      After the browser redirects back to the callback page, call handleRedirectCallback to handle success and error responses from Auth0. If the response is successful, results will be valid according to their expiration times.

      Type Declaration

        • (url?: string): Promise<ConnectAccountRedirectResult | RedirectLoginResult<any>>
        • Parameters

          • Optionalurl: string

            The URL to that should be used to retrieve the state and code values. Defaults to window.location.href if not given.

            -

          Returns Promise<ConnectAccountRedirectResult | RedirectLoginResult<any>>

      isAuthenticated: boolean
      isLoading: boolean
      loginWithCustomTokenExchange: (
          options: CustomTokenExchangeOptions,
      ) => Promise<TokenEndpointResponse>
      await loginWithCustomTokenExchange(options);
      +

      Returns Promise<ConnectAccountRedirectResult | RedirectLoginResult<any>>

      isAuthenticated: boolean
      isLoading: boolean
      loginWithCustomTokenExchange: (
          options: CustomTokenExchangeOptions,
      ) => Promise<TokenEndpointResponse>
      await loginWithCustomTokenExchange(options);
       

      Exchanges an external subject token for Auth0 tokens and logs the user in. @@ -141,7 +141,7 @@

      const options = {
      subject_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6Ikp...',
      subject_token_type: 'urn:acme:legacy-system-token',
      scope: 'openid profile email',
      audience: 'https://api.example.com',
      organization: 'org_12345'
      };

      try {
      const tokenResponse = await loginWithCustomTokenExchange(options);
      console.log('Access token:', tokenResponse.access_token);

      // User is now logged in - access user info
      const user = await getUser();
      console.log('Logged in user:', user);
      } catch (error) {
      console.error('Token exchange failed:', error);
      }
      -
      loginWithPopup: (
          options?: PopupLoginOptions,
          config?: PopupConfigOptions,
      ) => Promise<void>
      await loginWithPopup(options, config);
      +
      loginWithPopup: (
          options?: PopupLoginOptions,
          config?: PopupConfigOptions,
      ) => Promise<void>
      await loginWithPopup(options, config);
       

      Opens a popup with the /authorize URL using the parameters @@ -151,20 +151,20 @@

      IMPORTANT: This method has to be called from an event handler that was started by the user like a button click, for example, otherwise the popup will be blocked in most browsers.

      -
      loginWithRedirect: (options?: RedirectLoginOptions<AppState>) => Promise<void>
      await loginWithRedirect(options);
      +
      loginWithRedirect: (options?: RedirectLoginOptions<AppState>) => Promise<void>
      await loginWithRedirect(options);
       

      Performs a redirect to /authorize using the parameters provided as arguments. Random and secure state and nonce parameters will be auto-generated.

      -
      logout: (options?: LogoutOptions) => Promise<void>
      auth0.logout({ logoutParams: { returnTo: window.location.origin } });
      +
      logout: (options?: LogoutOptions) => Promise<void>
      auth0.logout({ logoutParams: { returnTo: window.location.origin } });
       

      Clears the application session and performs a redirect to /v2/logout, using the parameters provided as arguments, to clear the Auth0 session. If the logoutParams.federated option is specified, it also clears the Identity Provider session. Read more about how Logout works at Auth0.

      -
      setDpopNonce: (nonce: string, id?: string) => Promise<void>

      Sets the current DPoP nonce used for making requests to Auth0.

      +
      setDpopNonce: (nonce: string, id?: string) => Promise<void>

      Sets the current DPoP nonce used for making requests to Auth0.

      It requires enabling the Auth0ClientOptions.useDpop option.

      Type Declaration

        • (nonce: string, id?: string): Promise<void>
        • Sets the current DPoP nonce used for making requests to Auth0.

          It requires enabling the Auth0ClientOptions.useDpop option.

          @@ -176,4 +176,4 @@

          The identifier of a nonce: if absent, it will set the nonce used for requests to Auth0. Otherwise, it will be used to select a specific non-Auth0 nonce.

          -
      user: TUser | undefined
      +
      user: TUser | undefined
      diff --git a/docs/interfaces/Auth0ProviderOptions.html b/docs/interfaces/Auth0ProviderOptions.html index 07791fb8..06a90563 100644 --- a/docs/interfaces/Auth0ProviderOptions.html +++ b/docs/interfaces/Auth0ProviderOptions.html @@ -1,5 +1,5 @@ Auth0ProviderOptions | @auth0/auth0-react
      @auth0/auth0-react
        Preparing search index...

        Interface Auth0ProviderOptions<TUser>

        The main configuration to instantiate the Auth0Provider.

        -
        interface Auth0ProviderOptions<TUser extends User = User> {
            auth0Client?: {
                env?: { [key: string]: string };
                name: string;
                version: string;
            };
            authorizationParams?: ClientAuthorizationParams;
            authorizeTimeoutInSeconds?: number;
            cache?: ICache;
            cacheLocation?: CacheLocation;
            children?: ReactNode;
            clientId: string;
            context?: Context<Auth0ContextInterface<TUser>>;
            cookieDomain?: string;
            domain: string;
            httpTimeoutInSeconds?: number;
            issuer?: string;
            leeway?: number;
            legacySameSiteCookie?: boolean;
            nowProvider?: () => number | Promise<number>;
            onRedirectCallback?: (appState?: AppState, user?: TUser) => void;
            sessionCheckExpiryDays?: number;
            skipRedirectCallback?: boolean;
            useCookiesForTransactions?: boolean;
            useDpop?: boolean;
            useFormData?: boolean;
            useMrrt?: boolean;
            useRefreshTokens?: boolean;
            useRefreshTokensFallback?: boolean;
            workerUrl?: string;
        }

        Type Parameters

        Hierarchy

        • Auth0ClientOptions
          • Auth0ProviderOptions
        Index

        Properties

        interface Auth0ProviderOptions<TUser extends User = User> {
            auth0Client?: {
                env?: { [key: string]: string };
                name: string;
                version: string;
            };
            authorizationParams?: ClientAuthorizationParams;
            authorizeTimeoutInSeconds?: number;
            cache?: ICache;
            cacheLocation?: CacheLocation;
            children?: ReactNode;
            clientId: string;
            context?: Context<Auth0ContextInterface<TUser>>;
            cookieDomain?: string;
            domain: string;
            httpTimeoutInSeconds?: number;
            issuer?: string;
            leeway?: number;
            legacySameSiteCookie?: boolean;
            nowProvider?: () => number | Promise<number>;
            onRedirectCallback?: (appState?: AppState, user?: TUser) => void;
            sessionCheckExpiryDays?: number;
            skipRedirectCallback?: boolean;
            useCookiesForTransactions?: boolean;
            useDpop?: boolean;
            useFormData?: boolean;
            useMrrt?: boolean;
            useRefreshTokens?: boolean;
            useRefreshTokensFallback?: boolean;
            workerUrl?: string;
        }

        Type Parameters

        Hierarchy

        • Auth0ClientOptions
          • Auth0ProviderOptions
        Index

        Properties

        children?: ReactNode

        The child nodes your Provider has wrapped

        -
        clientId: string

        The Client ID found on your Application settings page

        +
        clientId: string

        The Client ID found on your Application settings page

        context?: Context<Auth0ContextInterface<TUser>>

        Context to be used when creating the Auth0Provider, defaults to the internally created context.

        This allows multiple Auth0Providers to be nested within the same application, the context value can then be passed to useAuth0, withAuth0, or withAuthenticationRequired to use that specific Auth0Provider to access @@ -48,7 +48,7 @@ used to store data is different

        For a sample on using multiple Auth0Providers review the React Account Linking Sample

        -
        cookieDomain?: string

        The domain the cookie is accessible from. If not set, the cookie is scoped to +

        cookieDomain?: string

        The domain the cookie is accessible from. If not set, the cookie is scoped to the current domain, including the subdomain.

        Note: setting this incorrectly may cause silent authentication to stop working on page load.

        @@ -73,7 +73,7 @@
        onRedirectCallback?: (appState?: AppState, user?: TUser) => void

        By default this removes the code and state parameters from the url when you are redirected from the authorize page. It uses window.history but you might want to overwrite this if you are using a custom router, like react-router-dom See the EXAMPLES.md for more info.

        -
        sessionCheckExpiryDays?: number

        Number of days until the cookie auth0.is.authenticated will expire +

        sessionCheckExpiryDays?: number

        Number of days until the cookie auth0.is.authenticated will expire Defaults to 1.

        skipRedirectCallback?: boolean

        By default, if the page url has code/state params, the SDK will treat them as Auth0's and attempt to exchange the code for a token. In some cases the code might be for something else (another OAuth SDK perhaps). In these @@ -81,7 +81,7 @@

        <Auth0Provider
        clientId={clientId}
        domain={domain}
        skipRedirectCallback={window.location.pathname === '/stripe-oauth-callback'}
        >
        -
        useCookiesForTransactions?: boolean

        If true, the SDK will use a cookie when storing information about the auth transaction while +

        useCookiesForTransactions?: boolean

        If true, the SDK will use a cookie when storing information about the auth transaction while the user is going through the authentication flow on the authorization server.

        The default is false, in which case the SDK will use session storage.

        You might want to enable this if you rely on your users being able to authenticate using flows that diff --git a/docs/interfaces/LogoutOptions.html b/docs/interfaces/LogoutOptions.html index 36412a2b..7b08351c 100644 --- a/docs/interfaces/LogoutOptions.html +++ b/docs/interfaces/LogoutOptions.html @@ -1,4 +1,4 @@ -LogoutOptions | @auth0/auth0-react

        @auth0/auth0-react
          Preparing search index...

          Interface LogoutOptions

          interface LogoutOptions {
              clientId?: string | null;
              logoutParams?: {
                  federated?: boolean;
                  returnTo?: string;
                  [key: string]: any;
              };
              openUrl?: false
              | ((url: string) => void | Promise<void>);
          }

          Hierarchy

          • Omit<SPALogoutOptions, "onRedirect">
            • LogoutOptions
          Index

          Properties

          clientId? +LogoutOptions | @auth0/auth0-react
          @auth0/auth0-react
            Preparing search index...

            Interface LogoutOptions

            interface LogoutOptions {
                clientId?: string | null;
                logoutParams?: {
                    federated?: boolean;
                    returnTo?: string;
                    [key: string]: any;
                };
                openUrl?: false
                | ((url: string) => void | Promise<void>);
            }

            Hierarchy

            • Omit<SPALogoutOptions, "onRedirect">
              • LogoutOptions
            Index

            Properties

            clientId?: string | null

            The clientId of your application.

            diff --git a/docs/interfaces/RedirectLoginOptions.html b/docs/interfaces/RedirectLoginOptions.html index 9957dbb3..4c7c380e 100644 --- a/docs/interfaces/RedirectLoginOptions.html +++ b/docs/interfaces/RedirectLoginOptions.html @@ -1,4 +1,4 @@ -RedirectLoginOptions | @auth0/auth0-react
            @auth0/auth0-react
              Preparing search index...

              Interface RedirectLoginOptions<TAppState>

              interface RedirectLoginOptions<TAppState = AppState> {
                  appState?: TAppState;
                  authorizationParams?: AuthorizationParams;
                  fragment?: string;
                  openUrl?: (url: string) => void | Promise<void>;
              }

              Type Parameters

              Hierarchy

              • Omit<SPARedirectLoginOptions<TAppState>, "onRedirect">
                • RedirectLoginOptions
              Index

              Properties

              appState? +RedirectLoginOptions | @auth0/auth0-react
              @auth0/auth0-react
                Preparing search index...

                Interface RedirectLoginOptions<TAppState>

                interface RedirectLoginOptions<TAppState = AppState> {
                    appState?: TAppState;
                    authorizationParams?: AuthorizationParams;
                    fragment?: string;
                    openUrl?: (url: string) => void | Promise<void>;
                }

                Type Parameters

                Hierarchy

                • Omit<SPARedirectLoginOptions<TAppState>, "onRedirect">
                  • RedirectLoginOptions
                Index

                Properties

                appState? authorizationParams? fragment? openUrl? diff --git a/docs/interfaces/WithAuth0Props.html b/docs/interfaces/WithAuth0Props.html index 8cffca76..d92b3bb8 100644 --- a/docs/interfaces/WithAuth0Props.html +++ b/docs/interfaces/WithAuth0Props.html @@ -1,3 +1,3 @@ WithAuth0Props | @auth0/auth0-react
                @auth0/auth0-react
                  Preparing search index...

                  Interface WithAuth0Props

                  Components wrapped in withAuth0 will have an additional auth0 prop

                  -
                  interface WithAuth0Props {
                      auth0: Auth0ContextInterface;
                  }
                  Index

                  Properties

                  Properties

                  +
                  interface WithAuth0Props {
                      auth0: Auth0ContextInterface;
                  }
                  Index

                  Properties

                  Properties

                  diff --git a/docs/interfaces/WithAuthenticationRequiredOptions.html b/docs/interfaces/WithAuthenticationRequiredOptions.html index 934ea9a4..9c76fe05 100644 --- a/docs/interfaces/WithAuthenticationRequiredOptions.html +++ b/docs/interfaces/WithAuthenticationRequiredOptions.html @@ -1,5 +1,5 @@ WithAuthenticationRequiredOptions | @auth0/auth0-react
                  @auth0/auth0-react
                    Preparing search index...

                    Interface WithAuthenticationRequiredOptions

                    Options for the withAuthenticationRequired Higher Order Component

                    -
                    interface WithAuthenticationRequiredOptions {
                        context?: Context<Auth0ContextInterface<User>>;
                        loginOptions?: RedirectLoginOptions<AppState>;
                        onBeforeAuthentication?: () => Promise<void>;
                        onRedirecting?: () => Element;
                        returnTo?: string | (() => string);
                    }
                    Index

                    Properties

                    interface WithAuthenticationRequiredOptions {
                        context?: Context<Auth0ContextInterface<User>>;
                        loginOptions?: RedirectLoginOptions<AppState>;
                        onBeforeAuthentication?: () => Promise<void>;
                        onRedirecting?: () => Element;
                        returnTo?: string | (() => string);
                    }
                    Index

                    Properties

                    context?: Context<Auth0ContextInterface<User>>

                    The context to be used when calling useAuth0, this should only be provided if you are using multiple Auth0Providers within your application and you wish to tie a specific component to a Auth0Provider other than the Auth0Provider associated with the default Auth0Context.

                    -
                    withAuthenticationRequired(Profile, {
                    loginOptions: {
                    appState: {
                    customProp: 'foo'
                    }
                    }
                    }) +
                    withAuthenticationRequired(Profile, {
                    loginOptions: {
                    appState: {
                    customProp: 'foo'
                    }
                    }
                    })

                    Pass additional login options, like extra appState to the login page. This will be merged with the returnTo option used by the onRedirectCallback handler.

                    -
                    onBeforeAuthentication?: () => Promise<void>
                    withAuthenticationRequired(Profile, {
                    onBeforeAuthentication: () => { analyticsLibrary.track('login_triggered'); }
                    }) +
                    onBeforeAuthentication?: () => Promise<void>
                    withAuthenticationRequired(Profile, {
                    onBeforeAuthentication: () => { analyticsLibrary.track('login_triggered'); }
                    })

                    Allows executing logic before the user is redirected to the login page.

                    -
                    onRedirecting?: () => Element
                    withAuthenticationRequired(Profile, {
                    onRedirecting: () => <div>Redirecting you to the login...</div>
                    }) +
                    onRedirecting?: () => Element
                    withAuthenticationRequired(Profile, {
                    onRedirecting: () => <div>Redirecting you to the login...</div>
                    })

                    Render a message to show that the user is being redirected to the login.

                    -
                    returnTo?: string | (() => string)
                    withAuthenticationRequired(Profile, {
                    returnTo: '/profile'
                    }) +
                    returnTo?: string | (() => string)
                    withAuthenticationRequired(Profile, {
                    returnTo: '/profile'
                    })

                    or

                    @@ -28,4 +28,4 @@

                    Add a path for the onRedirectCallback handler to return the user to after login.

                    -
                    +
                    diff --git a/docs/types/AppState.html b/docs/types/AppState.html index 2d0281f1..6e2b7371 100644 --- a/docs/types/AppState.html +++ b/docs/types/AppState.html @@ -1,6 +1,6 @@ AppState | @auth0/auth0-react
                    @auth0/auth0-react
                      Preparing search index...

                      Type Alias AppState

                      The state of the application before the user was redirected to the login page and any account that the user may have connected to.

                      -
                      type AppState = {
                          connectedAccount?: ConnectedAccount;
                          response_type?: ResponseType;
                          returnTo?: string;
                          [key: string]: any;
                      }

                      Indexable

                      • [key: string]: any
                      Index

                      Properties

                      type AppState = {
                          connectedAccount?: ConnectedAccount;
                          response_type?: ResponseType;
                          returnTo?: string;
                          [key: string]: any;
                      }

                      Indexable

                      • [key: string]: any
                      Index

                      Properties

                      connectedAccount?: ConnectedAccount
                      response_type?: ResponseType
                      returnTo?: string
                      +

                      Properties

                      connectedAccount?: ConnectedAccount
                      response_type?: ResponseType
                      returnTo?: string
                      diff --git a/docs/types/ConnectedAccount.html b/docs/types/ConnectedAccount.html index e51ba53c..41ece229 100644 --- a/docs/types/ConnectedAccount.html +++ b/docs/types/ConnectedAccount.html @@ -1,2 +1,2 @@ ConnectedAccount | @auth0/auth0-react
                      @auth0/auth0-react
                        Preparing search index...

                        Type Alias ConnectedAccount

                        ConnectedAccount: Omit<
                            ConnectAccountRedirectResult,
                            "appState"
                            | "response_type",
                        >

                        The account that has been connected during the connect flow.

                        -
                        +
                        diff --git a/docs/variables/Auth0Context.html b/docs/variables/Auth0Context.html index caf97bff..e60d432f 100644 --- a/docs/variables/Auth0Context.html +++ b/docs/variables/Auth0Context.html @@ -1,2 +1,2 @@ Auth0Context | @auth0/auth0-react
                        @auth0/auth0-react
                          Preparing search index...

                          Variable Auth0ContextConst

                          Auth0Context: Context<Auth0ContextInterface<User>> = ...

                          The Auth0 Context

                          -
                          +
                          diff --git a/package-lock.json b/package-lock.json index a0ce2f0a..254239dd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@auth0/auth0-react", - "version": "2.13.0", + "version": "2.14.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@auth0/auth0-react", - "version": "2.13.0", + "version": "2.14.0", "license": "MIT", "dependencies": { "@auth0/auth0-spa-js": "^2.15.0" diff --git a/package.json b/package.json index f8436d8e..67339e5a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "author": "Auth0", "name": "@auth0/auth0-react", - "version": "2.13.0", + "version": "2.14.0", "description": "Auth0 SDK for React Single Page Applications (SPA)", "keywords": [ "auth0",