diff --git a/.version b/.version index ed51b084..1f38bc0e 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -v2.9.0 \ No newline at end of file +v2.10.0 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ac4f81e..76038178 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## [v2.10.0](https://github.com/auth0/auth0-react/tree/v2.10.0) (2025-12-05) +[Full Changelog](https://github.com/auth0/auth0-react/compare/v2.9.0...v2.10.0) + +**Added** +- feat: add custom token exchange support [\#928](https://github.com/auth0/auth0-react/pull/928) ([gyaneshgouraw-okta](https://github.com/gyaneshgouraw-okta)) + ## [v2.9.0](https://github.com/auth0/auth0-react/tree/v2.9.0) (2025-11-18) [Full Changelog](https://github.com/auth0/auth0-react/compare/v2.8.0...v2.9.0) diff --git a/docs/assets/hierarchy.js b/docs/assets/hierarchy.js index f7ea4550..6b198bfe 100644 --- a/docs/assets/hierarchy.js +++ b/docs/assets/hierarchy.js @@ -1 +1 @@ -window.hierarchyData = "eJyVlMtOwzAQRf9l1gaS2E5IdqgghFQeKkUsqi4sd9pYpHawnRXqv6O0ArkvHFaRnOOcuZ5xvsAa4x1UM56VhNKEZDSfE7C4bFB6ZbSD6gsymvcPLdYIFbyYtmvHZqX0c7tDCHwovYAq4zmBzjZQgdIe7VJIdFdH/GXt1w0QkI1wDirwbnHRf+Did1P/slbNwqKGapaxdL4hkLE0qOIe/dR8oH5Xvt4ahhVzbtuAmjYEKE2CEh5GQtYYEe6g/0amrOwjU1YGvrGRonn1xooV7qvT7PpHvTWguzqCz5awW+hteRHYpmqNpvN31hr7lyjkIo69iIzxbcQy7OrjUkzws1MWF1HxIRsPyNLycI5HQktsmgG6E/gAI+OHxqHnegQPsBXhWd50vkbtlRT9hEd9J/C4kSd73VPOKb2a4NKiq7f3LN7FM3sGuLNy73+g0SoZ9YXcf8aV5gWhZUpYWhJWpIQnKeGckzwp+jHmPGz0m8Pb1rRPRkuMVnQEx6PnSXhTR0ZrlPGJCrmYY7P5Bup+Bu0=" \ No newline at end of file +window.hierarchyData = "eJyVlMtOwzAQRf9l1i5Qv5JmhwpCSLzEQywqFpY7bSxSO9jOCvXfUVqB3JbisIrkHOfM9YzzCd65GKCaCSYJYwWhnL0R8LhoUEfjbIDqEyhn/cOqFUIFD67t2hu3NPa+3SIE3o2dQ0WFJND5BiowNqJfKI3h9IA/qeOqAQK6USFABTHMR/0HRj+b+pe1aeYeLVQzysu3NQHKy6SKK4zP7h3tq4n1xjCsmGPbBtS0JsBYkZRwPVW6xoxwC/03MhOyj8yETHw3TqvmKTqvlrirHtPyW70xYDg9gI+WsF3obQVPbM9mha6Ll947/5co5TKOnYhc0E3ESdrV24V6xI/OeJxnxftsPiCncn+Op8pqbJoBul/wAUZB941Dz/UAHmAr0rM872KNNhqt+gnP+n7B80ZxttM9E4Kxy0dceAz15p7lu3hkzwA3kzv/A4ve6Kwv5f4zrqzghE1KwqkkvCiJOCuJkJTIMe/HWMi00S8BL1rX3jmrMVvRAZyPLsfpTZ06a1HnJyrlco71+gtvAAcT" \ No newline at end of file diff --git a/docs/assets/highlight.css b/docs/assets/highlight.css index 7034103c..2d9bb903 100644 --- a/docs/assets/highlight.css +++ b/docs/assets/highlight.css @@ -27,6 +27,8 @@ --dark-hl-12: #569CD6; --light-hl-13: #098658; --dark-hl-13: #B5CEA8; + --light-hl-14: #000000; + --dark-hl-14: #C8C8C8; --light-code-background: #FFFFFF; --dark-code-background: #1E1E1E; } @@ -46,6 +48,7 @@ --hl-11: var(--light-hl-11); --hl-12: var(--light-hl-12); --hl-13: var(--light-hl-13); + --hl-14: var(--light-hl-14); --code-background: var(--light-code-background); } } @@ -64,6 +67,7 @@ --hl-11: var(--dark-hl-11); --hl-12: var(--dark-hl-12); --hl-13: var(--dark-hl-13); + --hl-14: var(--dark-hl-14); --code-background: var(--dark-code-background); } } @@ -82,6 +86,7 @@ --hl-11: var(--light-hl-11); --hl-12: var(--light-hl-12); --hl-13: var(--light-hl-13); + --hl-14: var(--light-hl-14); --code-background: var(--light-code-background); } @@ -100,6 +105,7 @@ --hl-11: var(--dark-hl-11); --hl-12: var(--dark-hl-12); --hl-13: var(--dark-hl-13); + --hl-14: var(--dark-hl-14); --code-background: var(--dark-code-background); } @@ -117,4 +123,5 @@ .hl-11 { color: var(--hl-11); } .hl-12 { color: var(--hl-12); } .hl-13 { color: var(--hl-13); } +.hl-14 { color: var(--hl-14); } pre, code { background: var(--code-background); } diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js index cbaa13f3..d8abc43f 100644 --- a/docs/assets/navigation.js +++ b/docs/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "eJylll1v2jAUhv+Lr+nasrXbuKvYh5DoioCqF9MuPOdArAbbs52ubNp/n5IQEscfiZxLOK+fx0nso/P9L9LwqtEMrUEJzhRsjwLQBAmsUzRDwPKDumzX3qT6kKEJeqYsQbMPE0QyrBSaIa2SC6ou4FWDZDhD/yZn9l2uU2CaEqwpZ5+l5LJRlOtBXTpCput6Osw254wB0R5NuxrH/woMJCUefrsax1+wezhweZxjkoItMMpxhiUnONtoLvEePBYrEme63+E1/MqphMTzvrqJSA9VirL9GnYSVLrlz+A7Zr5knPehOLUeU1Oz2C3CiotczDEjkGXel+QIxe23BG3pAXjuuyBWJM4UloznPyr4JLj4xhkBj8SKRJvc8EhecSyu5pwVPxdMg9xh0rqBtP6raolW0pROb2676JXkLzQB+SCKRqr85E6wD8wl/VP25hWW+ODndnIWdmCT1eXd3NAMmM6OoYfxZMeJn6hOy6swxNwNx6kXnV7cEi0cPXgwNin36OZWtTjwku95rkPvx0iEzlcVfJRZP60Jxe266qWc7eg+JLNjI3RLvqes19ZOxcnWkFAJRJ+GnDtCeM6CXyi4Ytwmeh/aFQwdkuKW1Y1LuJFmZAisGTnrMSS05d5VwSYqxEZj3brh+iiKpnn6v7P26uP765tpe7AtegD+mVmAc8FJGDY0F4hi6CuewsmviyMcxhmrv/4aVJ5pSxnIjt4BJCeux3qu932RL6BJCrJqE12YUYzfc3sIaBQvWNLii5tDgml5O/WNBg1nlzNSHlxzJDBBt+9aoFxBGXUx6lpg+e/6hrrWn4sDAPYVDBHttKX48R+nXTWO" \ No newline at end of file +window.navigationData = "eJyll8tu2zAQRf+Fa6dJ3CZtvQvcBww4jWEnyKLogqXGEhGJZEkqtVv03wtJlvXgQwK1jOfyHEoiB5Pvf5GGg0YLtAUlOFPweBSAZkhgnaAFApZn6rJde5PoLEUz9EJZhBYfZoikWCm0QFpFF1RdwEGDZDhF/2Zn9l2uE2CaEqwpZ5+l5LJRlOtBXVpCXdf1fJxtyRkDoh2adjWM/xUYSEoc/HY1jL9i95BxeVxikoAp6JTDDGtOcLrTXOIYHBYjEma63+Mt/MqphMjxvvqJQA9VirJ4C3sJKnnkL+A6Zq5kmPehOLUOU1Mz2C3ChotcLDEjkKbOl2QJhe23BD3SDHjuuiBGJMzkl0znPyn4JLj4xhkBh8SIBJvs8EBecSyulpwVf66YBrnHpHUDaf1T1RKNZFc6v7ntozeSv9II5IMoGqlyk3vBITCX9E/ZmzdY4szN7eUM7Mgmq8u7uaMpMJ0efQ/jyE4TP1OdlFdhjLkfDlOver24JVpZevBobFTu0c6tamHgNY95rn3vp5Pwna8q+CTTYVoTCtt11Us529PYJzNjE3RrHlM2aGunwmRbiKgEok9Dzh0hPGfeL+RdMW0Tgw9tC/oOSXHL6sYl7MhuZAysGTnrMcS35cFV3iYqxE5j3brh+iiKpnn6vbf26uP765t5e7AtegD+mRqAc8FKGDc0F4hi6CuewsqvixMcnTNWf/0tqDzVhtKTnbwDiE5ch/VcH/wiudI8q4bIA0kwi8E4PSeyMxn+NF9AkwRk1aT6wk4x3FHtmEWC0+IzVP8H9l3WULizPfY0qlcsaXHGu2NR1/J27hqGGs4+Z6R88d0hqAu6fdcC5QrKqI1R1zzLf9c9ybb+XBwBMJuOj2imDcWP//QYiiQ=" \ No newline at end of file diff --git a/docs/assets/search.js b/docs/assets/search.js index 37c2f273..34f2f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EiY0M4LEU9iECZMwoZkR9CZsEyZMwoRmRkhyzDZhwiRMaGYEiaewCRMmYUIzIzZkzzZhwiRMaGYEiaewCRMmYXI1OmZpEyZNwiQftS1twqRJmNTMCDIxpE2YNAmTFWFkYkibMDk4blXnLTIxJHHiMgmTmhlJsi1twqRJmNTMSJJtaRPW/FQdrh9UXqrwfX3IPh6Zn2VF/b/vI/vanL3Fuj3rPzKxZYfHp6f+rH14fELHbf1M99W8Res1YI80Vu4a3ZsoZGfXS0mYLdW9bMCaEkm6K2bdf3jIHRqoFPO1urdaaO54LwluA+6/AyAZQDJuzqZupPTCCI/1HFn0qgPN3waBsqsFJHeV7W9G9Ypo9px1hsyBQHMn6zjhuBTmzZleEw1046TUXH5BrpCpOsYtO4lLVmgB0Py7qZmXX3qlba+0c1Ii7qz0aijr945q9C2TXhKlKnerSaP3QhBuK6TqBpx5qwNJYXTdaLPvYyA5xAt3W9uxOxRIFPHC3Wqndf0BqaFCzN2KCbqvgHRQTeJu2WV+U0D5gBZBuM3a8JoC8oWSnrslK3G/AOmhHONuSdbeEUAiKLW4W27VItRehQYIbgNMKxqGtQ1lkVtqjn1kQSuJ+BduqFJfkNFgEa3gRuvg0woyh+uum1arNEYuIDjADY7BFwFkD2kJN0b6V/5IBs2Y2DS7u9v6FmNFElVxcJQiP7+jiUPVA9yqx7lQ1plXIoalG2/1pRXkBEmA22aiS4VtBRUx6UZXp5PV3+ORKVQvwI2FVqxPzLz7RoBcogSVbvM+LkyVcjSbwmE2rz2WRZmKo0Sxw/H66el/H0H8AQ=="; \ No newline at end of file diff --git a/docs/classes/AuthenticationError.html b/docs/classes/AuthenticationError.html index 1aeffaa9..b7fc8047 100644 --- a/docs/classes/AuthenticationError.html +++ b/docs/classes/AuthenticationError.html @@ -1,6 +1,6 @@ AuthenticationError | @auth0/auth0-react
@auth0/auth0-react
    Preparing search index...

    Class AuthenticationError

    Thrown when handling the redirect callback fails, will be one of Auth0's Authentication API's Standard Error Responses: https://auth0.com/docs/api/authentication?javascript#standard-error-responses

    -

    Hierarchy (View Summary)

    Index

    Constructors

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    appState error error_description diff --git a/docs/classes/ConnectError.html b/docs/classes/ConnectError.html index d30b10ae..550dc812 100644 --- a/docs/classes/ConnectError.html +++ b/docs/classes/ConnectError.html @@ -1,6 +1,6 @@ ConnectError | @auth0/auth0-react
    @auth0/auth0-react
      Preparing search index...

      Class ConnectError

      Thrown when handling the redirect callback for the connect flow fails, will be one of Auth0's Authentication API's Standard Error Responses: https://auth0.com/docs/api/authentication?javascript#standard-error-responses

      -

      Hierarchy (View Summary)

      Index

      Constructors

      Hierarchy (View Summary)

      Index

      Constructors

      Properties

      appState connection error diff --git a/docs/classes/GenericError.html b/docs/classes/GenericError.html index fa105c1e..756f8422 100644 --- a/docs/classes/GenericError.html +++ b/docs/classes/GenericError.html @@ -1,5 +1,5 @@ GenericError | @auth0/auth0-react
      @auth0/auth0-react
        Preparing search index...

        Class GenericError

        Thrown when network requests to the Auth server fail.

        -

        Hierarchy (View Summary)

        Index

        Constructors

        Hierarchy (View Summary)

        Index

        Constructors

        Properties

        error error_description message diff --git a/docs/classes/MfaRequiredError.html b/docs/classes/MfaRequiredError.html index 28959d2e..81e0015a 100644 --- a/docs/classes/MfaRequiredError.html +++ b/docs/classes/MfaRequiredError.html @@ -1,5 +1,5 @@ MfaRequiredError | @auth0/auth0-react
        @auth0/auth0-react
          Preparing search index...

          Class MfaRequiredError

          Error thrown when the token exchange results in a mfa_required error

          -

          Hierarchy (View Summary)

          Index

          Constructors

          Hierarchy (View Summary)

          Index

          Constructors

          Properties

          error error_description message diff --git a/docs/classes/MissingRefreshTokenError.html b/docs/classes/MissingRefreshTokenError.html index 0eecc340..47571d3c 100644 --- a/docs/classes/MissingRefreshTokenError.html +++ b/docs/classes/MissingRefreshTokenError.html @@ -1,5 +1,5 @@ MissingRefreshTokenError | @auth0/auth0-react
          @auth0/auth0-react
            Preparing search index...

            Class MissingRefreshTokenError

            Error thrown when there is no refresh token to use

            -

            Hierarchy (View Summary)

            Index

            Constructors

            Hierarchy (View Summary)

            Index

            Constructors

            Properties

            audience error error_description diff --git a/docs/classes/OAuthError.html b/docs/classes/OAuthError.html index 94f82381..a9915c39 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/classes/PopupCancelledError.html b/docs/classes/PopupCancelledError.html index 5b96190e..59b08e6d 100644 --- a/docs/classes/PopupCancelledError.html +++ b/docs/classes/PopupCancelledError.html @@ -1,5 +1,5 @@ PopupCancelledError | @auth0/auth0-react
              @auth0/auth0-react
                Preparing search index...

                Class PopupCancelledError

                Thrown when network requests to the Auth server fail.

                -

                Hierarchy (View Summary)

                Index

                Constructors

                Hierarchy (View Summary)

                Index

                Constructors

                Properties

                error error_description message diff --git a/docs/classes/PopupTimeoutError.html b/docs/classes/PopupTimeoutError.html index 83e875cb..3ddc168d 100644 --- a/docs/classes/PopupTimeoutError.html +++ b/docs/classes/PopupTimeoutError.html @@ -1,5 +1,5 @@ PopupTimeoutError | @auth0/auth0-react
                @auth0/auth0-react
                  Preparing search index...

                  Class PopupTimeoutError

                  Error thrown when the login popup times out (if the user does not complete auth)

                  -

                  Hierarchy (View Summary)

                  Index

                  Constructors

                  Hierarchy (View Summary)

                  Index

                  Constructors

                  Properties

                  error error_description message diff --git a/docs/classes/TimeoutError.html b/docs/classes/TimeoutError.html index c7a32361..a6e387d7 100644 --- a/docs/classes/TimeoutError.html +++ b/docs/classes/TimeoutError.html @@ -1,6 +1,6 @@ TimeoutError | @auth0/auth0-react
                  @auth0/auth0-react
                    Preparing search index...

                    Class TimeoutError

                    Thrown when silent auth times out (usually due to a configuration issue) or when network requests to the Auth server timeout.

                    -

                    Hierarchy (View Summary)

                    Index

                    Constructors

                    Hierarchy (View Summary)

                    Index

                    Constructors

                    Properties

                    error error_description message diff --git a/docs/classes/UseDpopNonceError.html b/docs/classes/UseDpopNonceError.html index 2cc8705e..6565da7f 100644 --- a/docs/classes/UseDpopNonceError.html +++ b/docs/classes/UseDpopNonceError.html @@ -1,5 +1,5 @@ UseDpopNonceError | @auth0/auth0-react
                    @auth0/auth0-react
                      Preparing search index...

                      Class UseDpopNonceError

                      Error thrown when the wrong DPoP nonce is used and a potential subsequent retry wasn't able to fix it.

                      -

                      Hierarchy (View Summary)

                      Index

                      Constructors

                      Hierarchy (View Summary)

                      Index

                      Constructors

                      Properties

                      error error_description message diff --git a/docs/functions/Auth0Provider.html b/docs/functions/Auth0Provider.html index fdd78454..744fbdde 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 fe072c1c..c35d2218 100644 --- a/docs/functions/useAuth0.html +++ b/docs/functions/useAuth0.html @@ -1,6 +1,6 @@ -useAuth0 | @auth0/auth0-react
                      @auth0/auth0-react
                        Preparing search index...

                        Function useAuth0

                        diff --git a/docs/functions/withAuth0.html b/docs/functions/withAuth0.html index 52ff04f2..f40bcdee 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 788a77d4..73edf628 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

                        • P extends object

                        Parameters

                        Returns FC<P>

                        +

                        Type Parameters

                        • P extends object

                        Parameters

                        Returns FC<P>

                        diff --git a/docs/hierarchy.html b/docs/hierarchy.html index d9d5dcbe..2094c871 100644 --- a/docs/hierarchy.html +++ b/docs/hierarchy.html @@ -1 +1 @@ -@auth0/auth0-react
                        @auth0/auth0-react
                          Preparing search index...
                          +@auth0/auth0-react
                          @auth0/auth0-react
                            Preparing search index...
                            diff --git a/docs/interfaces/Auth0ContextInterface.html b/docs/interfaces/Auth0ContextInterface.html index 36c72b7a..eb6a967f 100644 --- a/docs/interfaces/Auth0ContextInterface.html +++ b/docs/interfaces/Auth0ContextInterface.html @@ -1,7 +1,8 @@ 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: undefined | Error;
                                  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<undefined | string>;
                                  getDpopNonce: (id?: string) => Promise<undefined | string>;
                                  getIdTokenClaims: () => Promise<undefined | IdToken>;
                                  handleRedirectCallback: (
                                      url?: string,
                                  ) => Promise<ConnectAccountRedirectResult | RedirectLoginResult<any>>;
                                  isAuthenticated: boolean;
                                  isLoading: boolean;
                                  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: undefined | TUser;
                              }

                              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: undefined | Error;
                                  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<undefined | string>;
                                  getDpopNonce: (id?: string) => Promise<undefined | string>;
                                  getIdTokenClaims: () => Promise<undefined | IdToken>;
                                  handleRedirectCallback: (
                                      url?: string,
                                  ) => Promise<ConnectAccountRedirectResult | RedirectLoginResult<any>>;
                                  isAuthenticated: boolean;
                                  isLoading: boolean;
                                  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: undefined | TUser;
                              }

                              Type Parameters

                              Hierarchy

                              • AuthState<TUser>
                                • Auth0ContextInterface
                              Index

                              Properties

                              connectAccountWithRedirect createFetcher error +exchangeToken generateDpopProof getAccessTokenSilently getAccessTokenWithPopup @@ -23,7 +24,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.

                              @@ -33,13 +34,30 @@ 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: undefined | Error
                              generateDpopProof: (
                                  params: {
                                      accessToken: string;
                                      method: string;
                                      nonce?: string;
                                      url: string;
                                  },
                              ) => Promise<string>

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

                              Type Parameters

                              • TOutput extends CustomFetchMinimalOutput = Response

                              Parameters

                              Returns Fetcher<TOutput>

                              error: undefined | Error
                              exchangeToken: (
                                  options: CustomTokenExchangeOptions,
                              ) => Promise<TokenEndpointResponse>
                              const tokenResponse = await exchangeToken({
                              subject_token: 'external_token_value',
                              subject_token_type: 'urn:acme:legacy-system-token',
                              scope: 'openid profile email'
                              }); +
                              + +

                              Exchanges an external subject token for Auth0 tokens via a token exchange request.

                              +

                              This method implements the token exchange grant as specified in RFC 8693. +It performs a token exchange by sending a request to the /oauth/token endpoint +with the external token and returns Auth0 tokens (access token, ID token, etc.).

                              +

                              The request includes the following parameters:

                              +
                                +
                              • grant_type: Hard-coded to "urn:ietf:params:oauth:grant-type:token-exchange"
                              • +
                              • subject_token: The external token to be exchanged
                              • +
                              • subject_token_type: A namespaced URI identifying the token type (must be under your organization's control)
                              • +
                              • audience: The target audience (falls back to the SDK's default audience if not provided)
                              • +
                              • scope: Space-separated list of scopes (merged with the SDK's default scopes)
                              • +
                              +

                              Type Declaration

                              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 @@ -58,7 +76,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<undefined | string>
                              const token = await getTokenWithPopup(options, config);
                              +
                              getAccessTokenWithPopup: (
                                  options?: GetTokenWithPopupOptions,
                                  config?: PopupConfigOptions,
                              ) => Promise<undefined | string>
                              const token = await getTokenWithPopup(options, config);
                               

                              Get an access token interactively.

                              @@ -66,7 +84,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.

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

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

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

                              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.

                              @@ -81,16 +99,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<undefined | IdToken>
                              const claims = await getIdTokenClaims();
                              +
                              getIdTokenClaims: () => Promise<undefined | IdToken>
                              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
                              loginWithPopup: (
                                  options?: PopupLoginOptions,
                                  config?: PopupConfigOptions,
                              ) => Promise<void>
                              await loginWithPopup(options, config);
                              +

                              Returns Promise<ConnectAccountRedirectResult | RedirectLoginResult<any>>

                              isAuthenticated: boolean
                              isLoading: boolean
                              loginWithPopup: (
                                  options?: PopupLoginOptions,
                                  config?: PopupConfigOptions,
                              ) => Promise<void>
                              await loginWithPopup(options, config);
                               

                              Opens a popup with the /authorize URL using the parameters @@ -100,20 +118,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.

                                  @@ -125,4 +143,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: undefined | TUser
                              +
                              user: undefined | TUser
                              diff --git a/docs/interfaces/Auth0ProviderOptions.html b/docs/interfaces/Auth0ProviderOptions.html index 105b65b5..6a370019 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/GetTokenWithPopupOptions.html b/docs/interfaces/GetTokenWithPopupOptions.html index 819e1f39..47a39a89 100644 --- a/docs/interfaces/GetTokenWithPopupOptions.html +++ b/docs/interfaces/GetTokenWithPopupOptions.html @@ -1,4 +1,4 @@ -GetTokenWithPopupOptions | @auth0/auth0-react

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

                                  Interface GetTokenWithPopupOptions

                                  interface GetTokenWithPopupOptions {
                                      authorizationParams?: AuthorizationParams;
                                      cacheMode?: "on" | "off" | "cache-only";
                                  }

                                  Hierarchy (View Summary)

                                  Index

                                  Properties

                                  authorizationParams? +GetTokenWithPopupOptions | @auth0/auth0-react
                                  @auth0/auth0-react
                                    Preparing search index...

                                    Interface GetTokenWithPopupOptions

                                    interface GetTokenWithPopupOptions {
                                        authorizationParams?: AuthorizationParams;
                                        cacheMode?: "on" | "off" | "cache-only";
                                    }

                                    Hierarchy (View Summary)

                                    Index

                                    Properties

                                    authorizationParams?: AuthorizationParams

                                    URL parameters that will be sent back to the Authorization Server. This can be known parameters defined by Auth0 or custom parameters that you define.

                                    diff --git a/docs/interfaces/LogoutOptions.html b/docs/interfaces/LogoutOptions.html index 707ef5c6..c4c48fcf 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?: null | string;
                                          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?: null | string;
                                            logoutParams?: {
                                                federated?: boolean;
                                                returnTo?: string;
                                                [key: string]: any;
                                            };
                                            openUrl?: false
                                            | ((url: string) => void | Promise<void>);
                                        }

                                        Hierarchy

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

                                        Properties

                                        clientId?: null | string

                                        The clientId of your application.

                                        diff --git a/docs/interfaces/PopupLoginOptions.html b/docs/interfaces/PopupLoginOptions.html index c3181963..59ea439d 100644 --- a/docs/interfaces/PopupLoginOptions.html +++ b/docs/interfaces/PopupLoginOptions.html @@ -1,4 +1,4 @@ -PopupLoginOptions | @auth0/auth0-react
                                        @auth0/auth0-react
                                          Preparing search index...

                                          Interface PopupLoginOptions

                                          interface PopupLoginOptions {
                                              authorizationParams?: AuthorizationParams;
                                          }

                                          Hierarchy (View Summary)

                                          Index

                                          Properties

                                          authorizationParams? +PopupLoginOptions | @auth0/auth0-react
                                          @auth0/auth0-react
                                            Preparing search index...

                                            Interface PopupLoginOptions

                                            interface PopupLoginOptions {
                                                authorizationParams?: AuthorizationParams;
                                            }

                                            Hierarchy (View Summary)

                                            Index

                                            Properties

                                            authorizationParams?: AuthorizationParams

                                            URL parameters that will be sent back to the Authorization Server. This can be known parameters defined by Auth0 or custom parameters that you define.

                                            diff --git a/docs/interfaces/RedirectLoginOptions.html b/docs/interfaces/RedirectLoginOptions.html index 7d881e03..23d0e0f4 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 16eea421..57223af8 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 e7cba395..3eaa4b79 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/modules.html b/docs/modules.html index a691e17b..0217d2f2 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -1 +1 @@ -@auth0/auth0-react
                                                    @auth0/auth0-react
                                                      Preparing search index...
                                                      +@auth0/auth0-react
                                                      @auth0/auth0-react
                                                        Preparing search index...
                                                        diff --git a/docs/types/AppState.html b/docs/types/AppState.html index 255d2030..9aa71afd 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 98b11be8..b93917dd 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/types/CustomTokenExchangeOptions.html b/docs/types/CustomTokenExchangeOptions.html new file mode 100644 index 00000000..fc5ca314 --- /dev/null +++ b/docs/types/CustomTokenExchangeOptions.html @@ -0,0 +1,47 @@ +CustomTokenExchangeOptions | @auth0/auth0-react
                                                            @auth0/auth0-react
                                                              Preparing search index...

                                                              Type Alias CustomTokenExchangeOptions

                                                              Represents the configuration options required for initiating a Custom Token Exchange request +following RFC 8693 specifications.

                                                              +
                                                              type CustomTokenExchangeOptions = {
                                                                  audience?: string;
                                                                  scope?: string;
                                                                  subject_token: string;
                                                                  subject_token_type: string;
                                                                  [key: string]: unknown;
                                                              }

                                                              Indexable

                                                              • [key: string]: unknown

                                                                Additional custom parameters for Auth0 Action processing

                                                                +

                                                                Accessible in Action code via event.request.body

                                                                +
                                                                {
                                                                custom_parameter: "session_context",
                                                                device_fingerprint: "a3d8f7...",
                                                                } +
                                                                + +
                                                              Index

                                                              Properties

                                                              audience?: string

                                                              The target audience for the requested Auth0 token

                                                              +

                                                              Must match exactly with an API identifier configured in your Auth0 tenant. +If not provided, falls back to the client's default audience.

                                                              +
                                                              "https://api.your-service.com/v1"
                                                              +
                                                              + +
                                                              scope?: string

                                                              Space-separated list of OAuth 2.0 scopes being requested

                                                              +

                                                              Subject to API authorization policies configured in Auth0

                                                              +
                                                              "openid profile email read:data write:data"
                                                              +
                                                              + +
                                                              subject_token: string

                                                              The opaque token value being exchanged for Auth0 tokens

                                                              +
                                                                +
                                                              • Must be validated in Auth0 Actions using strong cryptographic verification
                                                              • +
                                                              • Implement replay attack protection
                                                              • +
                                                              • Recommended validation libraries: jose, jsonwebtoken
                                                              • +
                                                              +
                                                              "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
                                                              +
                                                              + +
                                                              subject_token_type: string

                                                              The type identifier for the subject token being exchanged

                                                              +
                                                                +
                                                              • Must be a namespaced URI under your organization's control
                                                              • +
                                                              • Forbidden patterns: +
                                                                  +
                                                                • ^urn:ietf:params:oauth:* (IETF reserved)
                                                                • +
                                                                • ^https://auth0\.com/* (Auth0 reserved)
                                                                • +
                                                                • ^urn:auth0:* (Auth0 reserved)
                                                                • +
                                                                +
                                                              • +
                                                              +
                                                              "urn:acme:legacy-system-token"
                                                              "https://api.yourcompany.com/token-type/v1" +
                                                              + +
                                                              diff --git a/docs/types/TokenEndpointResponse.html b/docs/types/TokenEndpointResponse.html new file mode 100644 index 00000000..5f3d5144 --- /dev/null +++ b/docs/types/TokenEndpointResponse.html @@ -0,0 +1,7 @@ +TokenEndpointResponse | @auth0/auth0-react
                                                              @auth0/auth0-react
                                                                Preparing search index...

                                                                Type Alias TokenEndpointResponse

                                                                type TokenEndpointResponse = {
                                                                    access_token: string;
                                                                    expires_in: number;
                                                                    id_token: string;
                                                                    refresh_token?: string;
                                                                    scope?: string;
                                                                    token_type: string;
                                                                }
                                                                Index

                                                                Properties

                                                                access_token: string
                                                                expires_in: number
                                                                id_token: string
                                                                refresh_token?: string
                                                                scope?: string
                                                                token_type: string
                                                                diff --git a/docs/variables/Auth0Context.html b/docs/variables/Auth0Context.html index e24ee017..bed1373c 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 995b6dce..e59cfb59 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@auth0/auth0-react", - "version": "2.9.0", + "version": "2.10.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@auth0/auth0-react", - "version": "2.9.0", + "version": "2.10.0", "license": "MIT", "dependencies": { "@auth0/auth0-spa-js": "^2.9.1" @@ -10073,20 +10073,18 @@ }, "node_modules/react": { "version": "19.1.2", - "resolved": "https://a0us.jfrog.io/artifactory/api/npm/npm/react/-/react-19.1.2.tgz", + "resolved": "https://registry.npmjs.org/react/-/react-19.1.2.tgz", "integrity": "sha512-MdWVitvLbQULD+4DP8GYjZUrepGW7d+GQkNVqJEzNxE+e9WIa4egVFE/RDfVb1u9u/Jw7dNMmPB4IqxzbFYJ0w==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.10.0" } }, "node_modules/react-dom": { "version": "19.1.2", - "resolved": "https://a0us.jfrog.io/artifactory/api/npm/npm/react-dom/-/react-dom-19.1.2.tgz", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.2.tgz", "integrity": "sha512-dEoydsCp50i7kS1xHOmPXq4zQYoGWedUsvqv9H6zdif2r7yLHygyfP9qou71TulRN0d6ng9EbRVsQhSqfUc19g==", "dev": true, - "license": "MIT", "dependencies": { "scheduler": "^0.26.0" }, diff --git a/package.json b/package.json index 7d6309a3..d7056d2c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "author": "Auth0", "name": "@auth0/auth0-react", - "version": "2.9.0", + "version": "2.10.0", "description": "Auth0 SDK for React Single Page Applications (SPA)", "keywords": [ "auth0",