From 6d145e3a400d2bb1969b659ddeb9b17ad74f259a Mon Sep 17 00:00:00 2001 From: Yogesh Chaudhary Date: Fri, 13 Feb 2026 12:20:00 +0530 Subject: [PATCH] Release v2.14.0 --- .version | 2 +- CHANGELOG.md | 9 ++ docs/assets/hierarchy.js | 2 +- docs/assets/navigation.js | 2 +- docs/assets/search.js | 2 +- docs/classes/AuthenticationError.html | 2 +- docs/classes/ConnectError.html | 2 +- docs/classes/GenericError.html | 2 +- docs/classes/MfaChallengeError.html | 18 ++++ docs/classes/MfaEnrollmentError.html | 18 ++++ docs/classes/MfaEnrollmentFactorsError.html | 18 ++++ docs/classes/MfaError.html | 16 ++++ docs/classes/MfaListAuthenticatorsError.html | 18 ++++ docs/classes/MfaRequiredError.html | 2 +- docs/classes/MfaVerifyError.html | 18 ++++ docs/classes/MissingRefreshTokenError.html | 2 +- docs/classes/OAuthError.html | 4 +- docs/classes/PopupCancelledError.html | 2 +- docs/classes/PopupTimeoutError.html | 2 +- docs/classes/TimeoutError.html | 2 +- docs/classes/UseDpopNonceError.html | 2 +- docs/functions/Auth0Provider.html | 2 +- docs/functions/useAuth0.html | 2 +- docs/functions/withAuth0.html | 2 +- .../functions/withAuthenticationRequired.html | 2 +- docs/hierarchy.html | 2 +- docs/interfaces/Auth0ContextInterface.html | 48 ++++++---- docs/interfaces/Auth0ProviderOptions.html | 10 +- docs/interfaces/Authenticator.html | 16 ++++ .../ChallengeAuthenticatorParams.html | 8 ++ docs/interfaces/ChallengeResponse.html | 8 ++ docs/interfaces/EnrollEmailParams.html | 8 ++ docs/interfaces/EnrollOtpParams.html | 6 ++ docs/interfaces/EnrollPushParams.html | 6 ++ docs/interfaces/EnrollSmsParams.html | 8 ++ docs/interfaces/EnrollVoiceParams.html | 8 ++ docs/interfaces/EnrollmentFactor.html | 4 + docs/interfaces/GetTokenWithPopupOptions.html | 2 +- docs/interfaces/LogoutOptions.html | 2 +- docs/interfaces/MfaApiClient.html | 95 +++++++++++++++++++ docs/interfaces/PopupLoginOptions.html | 2 +- docs/interfaces/RedirectLoginOptions.html | 2 +- docs/interfaces/VerifyParams.html | 18 ++++ docs/interfaces/WithAuth0Props.html | 4 +- .../WithAuthenticationRequiredOptions.html | 12 +-- docs/modules.html | 2 +- docs/types/AppState.html | 4 +- docs/types/ConnectedAccount.html | 2 +- docs/types/EnrollParams.html | 2 + docs/types/EnrollmentResponse.html | 2 + docs/types/MfaFactorType.html | 2 + docs/variables/Auth0Context.html | 2 +- package-lock.json | 4 +- package.json | 2 +- 54 files changed, 383 insertions(+), 61 deletions(-) create mode 100644 docs/classes/MfaChallengeError.html create mode 100644 docs/classes/MfaEnrollmentError.html create mode 100644 docs/classes/MfaEnrollmentFactorsError.html create mode 100644 docs/classes/MfaError.html create mode 100644 docs/classes/MfaListAuthenticatorsError.html create mode 100644 docs/classes/MfaVerifyError.html create mode 100644 docs/interfaces/Authenticator.html create mode 100644 docs/interfaces/ChallengeAuthenticatorParams.html create mode 100644 docs/interfaces/ChallengeResponse.html create mode 100644 docs/interfaces/EnrollEmailParams.html create mode 100644 docs/interfaces/EnrollOtpParams.html create mode 100644 docs/interfaces/EnrollPushParams.html create mode 100644 docs/interfaces/EnrollSmsParams.html create mode 100644 docs/interfaces/EnrollVoiceParams.html create mode 100644 docs/interfaces/EnrollmentFactor.html create mode 100644 docs/interfaces/MfaApiClient.html create mode 100644 docs/interfaces/VerifyParams.html create mode 100644 docs/types/EnrollParams.html create mode 100644 docs/types/EnrollmentResponse.html create mode 100644 docs/types/MfaFactorType.html 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..22c7baa1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # 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) + +**Added** +- feat: add Multi-Factor Authentication (MFA) support [\#1014](https://github.com/auth0/auth0-react/pull/1014) ([gyaneshgouraw-okta](https://github.com/gyaneshgouraw-okta)) + +**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/assets/hierarchy.js b/docs/assets/hierarchy.js index ce9b904a..9d513353 100644 --- a/docs/assets/hierarchy.js +++ b/docs/assets/hierarchy.js @@ -1 +1 @@ -window.hierarchyData = "eJyVlMtuwyAQRf9l1vRhDMT1rkqrqlJfSlt1EWWByCRGccAFvIry75UTtSKv4qws2Wd85sLACpy1wUM55pySnGeEcjEh4HBWowraGg/lCigX3cPIJUIJb7Zpmyc71+a12SIEFtpMoaRcEGhdDSVoE9DNpEJ/dcBfVmFZAwFVS++hhOCnF90PLv6Kuo+VrqcODZRjKuhkTYAKGnXxgOHDLtB86VBtDP2aOVXWo6c1gZxnUQuPQ6kqTAi30LmR88F1FzkfXEe+J6tk/R6sk3PcVWe0+FVvDOivDuCTLWxfdLaiiGwfeom2DffOWfefKOYSjp2ITBRdRJbFu/o8kyP8brXDaVK8z6YDMkb353gojcK67qE7gvcwimLf2HddD+AethsW2W7bUKEJWsluwpO+I3jayGlsfNbeazMf4cyhrzbnLL2LJ2p6uPnufWDQaZX0xdw545oXBWEZJYxRwm4Y4ZQRPiiIyDcnlQ/ijf70eNfY5sUahcmODuB0dJHH98LQGoMqPVExl3Ks1z8U3wb7" \ No newline at end of file +window.hierarchyData = "eJyVlVFv2yAUhf8Lz7R1MNjEb1O6TZOSbera7aHqAyLXMSqBDMjDVOW/T060CtvJIE+RnHP9nXPvBb8hZ23wqHlmjOKSlZgw/oKRg1aDDMoaj5o3RBjvf4zYAmrQd7vb75Z2o8y33UmC0asya9QQVmG0dxo1SJkArhUS/N1Ef9uFrUYYSS28Rw0Kfn3Tv+Dmvaj/s1N67cCg5plU9OWAEalo5OIzhEf7CuaXCt2RkGfmUlmGpwNGJSsjC18WQnaQAJ5E10Yua9JHLmsS8ZZWCv0jWCc2METPCP+HPhLA303EFy2cHvS0eRHRHtUW7D58dM66/4FiXYIxiEjroo9IZ/FUV614gN975WCdBI+16YCU0vEeL4SRoHUG7ow8g1gXY2JuXyfiDNq8imgf9qEDE5QU/YYneWfkaSIjMXGlvFdm8wCtA98dz1l6ihdqMthseB8YcEomebHumnUt5wWmM4oppZjOK8xIhRkvcFUSXLPjBcV4POwnD/c7u/tqjYSkq4k4Hb8q47thYY0Bmd6qWJdm1Gx0OHMO5dWtrXmBeVFhXhLMGcecH9tZD9q5asVS+RBtqXU+x86FqnR4XlSj8MZZrbdg0m2eqjN4g4GuWrHohNZgNun1mYgzaINv+qoVP8Gp9k8OKlJmcPh4hd778knI3CGeL0rRD4e/TM/x2g==" \ No newline at end of file diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js index 2af5d713..862ed1f5 100644 --- a/docs/assets/navigation.js +++ b/docs/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "eJyll11v0zAUhv+Lrzu2FTagd1OBqVLHqnYTF4gL45wm1hLb2M5oQfx3lKRpPvyRyLlszuv3cZzjV6ff/yINB40WaAtKcKbg6SgAzZDAOkELBCzP1GW79ibRWYpm6IWyCC0+zBBJsVJogbSKLqi6gIMGyXCK/s3O3ne5ToBpSrCmnH2WkssGUa4HdWkRdVnX83G0JWcMiHZg2tUw/3tgIClx+LerYf4r9gAZl8clJgmYgE45jLDmBKc7zSWOwUExJGGkhz3ewq+cSogc59VXBHKoUpTFW9hLUMkTfwFXm7mUYdzHomsdpKZmeLccNlzkYokZgTR1HpJFFLbf0uiJZsBz1wUxJGEkP2S6/7OCT4KLr5wRcEAMSTDJbh7oV7TF1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+nYKCyroyeGC/KrbETWSKDUnXxHFwZszj8jeQ/ZN2BkCnWv5+fWqkAYJcDUnLMd2eeinL5+nK0LA1ZH8HWKCPXMqqUaA2vPew+rFY1B3als8KkazRjQOpfJIKkVjUFtUzlIajRjQI+cYBhEaaow2C2o8ozfEgpM0YOvKDq048BfiErKI/UYclcchl507hYaaNFzpzjaNi5z7PetYmHGS77nufLNj6HwnVOV8EHQYbdWFJb1aoeuMlKVyl6MLghDVG1fWYZ9z2PLRuCWfE/YIE1XhcE2EBMBWL1+F7jCmOfMuwm8I8YlMfjQfULfPqwuNJ7ypgvCci9qRd3GZf0QU+LLt1a2H4Lqi59vVgZHeVvKLNsqpLQ6pQ5Z0d29/t8Ze/bx/fnFVG9mikqGvlPLoAn0OhzXKBUWxacYs0XS/OvgCIaxjesNtgGZU2UhPdrRGUD86uugNvHBFcml4ml1pX7BCWJ7sHbPq7NTGf40bWdnt9IV1VaMpXVfcJ3T+27/A+EGFE5AVHW9izCC4YzVDlVtsPn1uWIYwXBGtcoszjhxL02vKJypX5xb1DMSpKgL5sXapLyddm3qW3Lrs8sZLjereY02jS7faUa5LG+MZ30edcwz/Gddx/vGN8EjDOxC7XO01Rbi219zQ5U2" \ No newline at end of file diff --git a/docs/assets/search.js b/docs/assets/search.js index c7eca539..1d8ee25f 100644 --- a/docs/assets/search.js +++ b/docs/assets/search.js @@ -1 +1 @@ -window.searchData = "eJy1mttu3DYQht+FvlWc5ZB7vEvdFAgQNEFTtBcLI1Ak2it4LaqS1klg+N0LanUYiiOZspU7w+L8/El+M+RKfGS5/l6w3f6R3SVpzHYcNgFLw3vFduzTu1N5eJ/nOmcBO+VHtmPRMSwKVbztHl0eyvsjC5onbMfYU9CoLTm0apFOizI/ReXzchd2WyQdsCzMVVra7roO+QJk26PysX7RtHpVL19jVUR5kpWJTv167EVM6B2Wq7Zz83xxpdNS/Sg/pKXKb8JItQaS5j/FW7Lh6NpZg4x0mqqofBdF+pSW/ybl4S8VJ7mKymmdXdRC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IVzChE2YMMwINDGES5iwCROGGYEmhnAJEzZhwjAj8E2mS5iwCROGGYGyLVzCmr+qZ4IHmZcy/lA/GxwOJMyyon5kfyRfm0cG3h21eiRiRfaPT0/9I8L+8Qk8JZhrpq/m5R/QYL0G5/4a3Qu0XkpQYGc9W6p7R2JpAkl/xax7MAVK4EbFZr5W9zKul2TAHfO74f7zBZBZAxk/Z1OnoHphoOvpznlDA0DZgfGjtYDwmxPrNF6vCHChvjpD5tgGjN22juOeN2uf1uo1gaTfbDQHroArYKqO2foL2Qf7wASARPVTsw9c9UrbXunKSwk5J9WrgSK081TDTzb1kgA16lfXRs8iAdxWQNUPOPcUEZCD+DJfOfDVGEgBXqjf3Lqnd4AcIIX6ZejYiRsgCmod9Usw57AMUAOlifolGTjdAnRArlK/HLO/rID0AjfI/SxNH2MBLkHCUb+MGx5BAWIg36hfwiFnR4AeSDbml2zt+Q9Q8EBuMb/cqkWwVRUY4n6GqiMhQAGkJvNLTV2hOqzj4K78jIx9BwOYAfK5H7HYR35wswAu5gfX4OsXMAfSiftptUqjaQXGkPuRMfhoA7ZwQEv4zWv/VQZYAiPGd81Oxq/sFiMVnMEV31MKPSEBJEGeM788PxfS2d8LsBgIP97qc0XACZBgfuuJKTauFbiZ96Or08nqIxNgEkGOcz8WWrE+MfPuMw5wCRJU+I37uDCWEHAf5zGaNwHJVCYTlUqyP9w8Pf0P5coctw=="; \ No newline at end of file diff --git a/docs/classes/AuthenticationError.html b/docs/classes/AuthenticationError.html index a93ef39c..eee1007e 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 7c00ec58..c0a64392 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 e810614c..7b6338de 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/MfaChallengeError.html b/docs/classes/MfaChallengeError.html new file mode 100644 index 00000000..6f89835b --- /dev/null +++ b/docs/classes/MfaChallengeError.html @@ -0,0 +1,18 @@ +MfaChallengeError | @auth0/auth0-react
        @auth0/auth0-react
          Preparing search index...

          Class MfaChallengeError

          Error thrown when initiating an MFA challenge fails.

          +
          try {
          const challenge = await mfa.challenge({
          mfaToken: mfaToken,
          challengeType: 'otp',
          authenticatorId: 'otp|dev_123'
          });
          } catch (error) {
          if (error instanceof MfaChallengeError) {
          console.log(error.error); // 'too_many_attempts'
          console.log(error.error_description); // 'Rate limit exceeded'
          }
          } +
          + +

          Hierarchy (View Summary)

          Index

          Constructors

          • Parameters

            • error: string
            • error_description: string

            Returns MfaChallengeError

          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

          • Parameters

            • __namedParameters: { error: string; error_description: string }

            Returns MfaError

          diff --git a/docs/classes/MfaEnrollmentError.html b/docs/classes/MfaEnrollmentError.html new file mode 100644 index 00000000..7b460ad0 --- /dev/null +++ b/docs/classes/MfaEnrollmentError.html @@ -0,0 +1,18 @@ +MfaEnrollmentError | @auth0/auth0-react
          @auth0/auth0-react
            Preparing search index...

            Class MfaEnrollmentError

            Error thrown when enrolling an MFA authenticator fails.

            +
            try {
            const enrollment = await mfa.enroll({
            authenticator_types: ['otp']
            });
            } catch (error) {
            if (error instanceof MfaEnrollmentError) {
            console.log(error.error); // 'invalid_phone_number'
            console.log(error.error_description); // 'Invalid phone number format'
            }
            } +
            + +

            Hierarchy (View Summary)

            Index

            Constructors

            • Parameters

              • error: string
              • error_description: string

              Returns MfaEnrollmentError

            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

            • Parameters

              • __namedParameters: { error: string; error_description: string }

              Returns MfaError

            diff --git a/docs/classes/MfaEnrollmentFactorsError.html b/docs/classes/MfaEnrollmentFactorsError.html new file mode 100644 index 00000000..f5ac57d9 --- /dev/null +++ b/docs/classes/MfaEnrollmentFactorsError.html @@ -0,0 +1,18 @@ +MfaEnrollmentFactorsError | @auth0/auth0-react
            @auth0/auth0-react
              Preparing search index...

              Class MfaEnrollmentFactorsError

              Error thrown when getting enrollment factors fails.

              +
              try {
              const factors = await mfa.getEnrollmentFactors(mfaToken);
              } catch (error) {
              if (error instanceof MfaEnrollmentFactorsError) {
              console.log(error.error); // 'mfa_context_not_found'
              console.log(error.error_description); // 'MFA context not found...'
              }
              } +
              + +

              Hierarchy (View Summary)

              Index

              Constructors

              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

              • Parameters

                • __namedParameters: { error: string; error_description: string }

                Returns MfaError

              diff --git a/docs/classes/MfaError.html b/docs/classes/MfaError.html new file mode 100644 index 00000000..cba7b5a0 --- /dev/null +++ b/docs/classes/MfaError.html @@ -0,0 +1,16 @@ +MfaError | @auth0/auth0-react
              @auth0/auth0-react
                Preparing search index...

                Class MfaError

                Base class for MFA-related errors in auth0-spa-js. +Extends GenericError for unified error hierarchy across the SDK.

                +

                Hierarchy (View Summary)

                Index

                Constructors

                • Parameters

                  • error: string
                  • error_description: string

                  Returns MfaError

                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

                • Parameters

                  • __namedParameters: { error: string; error_description: string }

                  Returns MfaError

                diff --git a/docs/classes/MfaListAuthenticatorsError.html b/docs/classes/MfaListAuthenticatorsError.html new file mode 100644 index 00000000..90312e9f --- /dev/null +++ b/docs/classes/MfaListAuthenticatorsError.html @@ -0,0 +1,18 @@ +MfaListAuthenticatorsError | @auth0/auth0-react
                @auth0/auth0-react
                  Preparing search index...

                  Class MfaListAuthenticatorsError

                  Error thrown when listing MFA authenticators fails.

                  +
                  try {
                  const authenticators = await mfa.getAuthenticators();
                  } catch (error) {
                  if (error instanceof MfaListAuthenticatorsError) {
                  console.log(error.error); // 'access_denied'
                  console.log(error.error_description); // 'Unauthorized'
                  }
                  } +
                  + +

                  Hierarchy (View Summary)

                  Index

                  Constructors

                  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

                  • Parameters

                    • __namedParameters: { error: string; error_description: string }

                    Returns MfaError

                  diff --git a/docs/classes/MfaRequiredError.html b/docs/classes/MfaRequiredError.html index 026483a5..2e2164a5 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/MfaVerifyError.html b/docs/classes/MfaVerifyError.html new file mode 100644 index 00000000..a7f8dd29 --- /dev/null +++ b/docs/classes/MfaVerifyError.html @@ -0,0 +1,18 @@ +MfaVerifyError | @auth0/auth0-react
                    @auth0/auth0-react
                      Preparing search index...

                      Class MfaVerifyError

                      Error thrown when verifying an MFA challenge fails.

                      +
                      try {
                      const tokens = await mfa.verify({
                      mfaToken: mfaToken,
                      grant_type: 'http://auth0.com/oauth/grant-type/mfa-otp',
                      otp: '123456'
                      });
                      } catch (error) {
                      if (error instanceof MfaVerifyError) {
                      console.log(error.error); // 'invalid_otp' or 'context_not_found'
                      console.log(error.error_description); // Error details
                      }
                      } +
                      + +

                      Hierarchy (View Summary)

                      Index

                      Constructors

                      • Parameters

                        • error: string
                        • error_description: string

                        Returns MfaVerifyError

                      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

                      • Parameters

                        • __namedParameters: { error: string; error_description: string }

                        Returns MfaError

                      diff --git a/docs/classes/MissingRefreshTokenError.html b/docs/classes/MissingRefreshTokenError.html index 0eb1af02..18778867 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 a5e96d1b..45225d88 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 87c6100f..b0dbea81 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 a1fa980c..96bdd02c 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 592e44a4..ef5c6b05 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 861edfce..a4dda775 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 52acca24..f71e896d 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..47255457 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..f97be09a 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..22e83f50 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 d5252ed1..6d196028 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 ca01ee2b..7d7837f4 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>;
                                            mfa: MfaApiClient;
                                            setDpopNonce: (nonce: string, id?: string) => Promise<void>;
                                            user: TUser | undefined;
                                        }

                                        Type Parameters

                                        Hierarchy

                                        • AuthState<TUser>
                                          • Auth0ContextInterface
                                        Index

                                        Properties

                                        connectAccountWithRedirect: (
                                            options: RedirectConnectAccountOptions,
                                        ) => Promise<void>
                                        await connectAccountWithRedirect({
                                        connection: 'google-oauth2',
                                        scopes: ['openid', 'profile', 'email', 'https://www.googleapis.com/auth/drive.readonly'],
                                        authorization_params: {
                                        // additional authorization params to forward to the authorization server
                                        }
                                        }); @@ -26,7 +27,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 +37,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 +51,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 +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<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 +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.

                                        -
                                        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 +94,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 +109,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 +142,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 +152,35 @@

                                        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.

                                        +
                                        const { mfa } = useAuth0();
                                        const authenticators = await mfa.getAuthenticators(mfaToken); +
                                        + +

                                        MFA API client for Multi-Factor Authentication operations.

                                        +

                                        Provides access to all MFA-related methods:

                                        +
                                          +
                                        • getAuthenticators(mfaToken) - List enrolled authenticators
                                        • +
                                        • enroll(params) - Enroll new authenticators (OTP, SMS, Voice, Email, Push)
                                        • +
                                        • challenge(params) - Initiate MFA challenges
                                        • +
                                        • verify(params) - Verify MFA challenges and complete authentication
                                        • +
                                        • getEnrollmentFactors(mfaToken) - Get available enrollment factors
                                        • +
                                        +
                                        const { mfa, getAccessTokenSilently } = useAuth0();

                                        try {
                                        await getAccessTokenSilently();
                                        } catch (error) {
                                        if (error.error === 'mfa_required') {
                                        // Check if enrollment is needed
                                        const factors = await mfa.getEnrollmentFactors(error.mfa_token);

                                        if (factors.length > 0) {
                                        // Enroll in OTP
                                        const enrollment = await mfa.enroll({
                                        mfaToken: error.mfa_token,
                                        factorType: 'otp'
                                        });
                                        console.log('QR Code:', enrollment.barcodeUri);
                                        }

                                        // Get authenticators and challenge
                                        const authenticators = await mfa.getAuthenticators(error.mfa_token);
                                        await mfa.challenge({
                                        mfaToken: error.mfa_token,
                                        challengeType: 'otp',
                                        authenticatorId: authenticators[0].id
                                        });

                                        // Verify with user's code
                                        const tokens = await mfa.verify({
                                        mfaToken: error.mfa_token,
                                        otp: userCode
                                        });
                                        }
                                        } +
                                        + +
                                        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 +192,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..ed6ee104 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/Authenticator.html b/docs/interfaces/Authenticator.html new file mode 100644 index 00000000..bc49bbbf --- /dev/null +++ b/docs/interfaces/Authenticator.html @@ -0,0 +1,16 @@ +Authenticator | @auth0/auth0-react

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

                                            Interface Authenticator

                                            Represents an MFA authenticator enrolled by a user

                                            +
                                            interface Authenticator {
                                                active: boolean;
                                                authenticatorType: AuthenticatorType;
                                                createdAt?: string;
                                                id: string;
                                                lastAuth?: string;
                                                name?: string;
                                                type?: string;
                                            }
                                            Index

                                            Properties

                                            active: boolean

                                            Whether the authenticator is active

                                            +
                                            authenticatorType: AuthenticatorType

                                            Type of authenticator

                                            +
                                            createdAt?: string

                                            ISO 8601 timestamp when created

                                            +
                                            id: string

                                            Unique identifier for the authenticator

                                            +
                                            lastAuth?: string

                                            ISO 8601 timestamp of last authentication

                                            +
                                            name?: string

                                            Optional friendly name

                                            +
                                            type?: string

                                            Types of MFA challenges

                                            +
                                            diff --git a/docs/interfaces/ChallengeAuthenticatorParams.html b/docs/interfaces/ChallengeAuthenticatorParams.html new file mode 100644 index 00000000..e5881740 --- /dev/null +++ b/docs/interfaces/ChallengeAuthenticatorParams.html @@ -0,0 +1,8 @@ +ChallengeAuthenticatorParams | @auth0/auth0-react
                                            @auth0/auth0-react
                                              Preparing search index...

                                              Interface ChallengeAuthenticatorParams

                                              Parameters for initiating an MFA challenge

                                              +
                                              interface ChallengeAuthenticatorParams {
                                                  authenticatorId?: string;
                                                  challengeType: "otp" | "oob";
                                                  mfaToken: string;
                                              }
                                              Index

                                              Properties

                                              authenticatorId?: string

                                              Specific authenticator to challenge (optional)

                                              +
                                              challengeType: "otp" | "oob"

                                              Type of challenge to initiate

                                              +
                                              mfaToken: string

                                              MFA token from mfa_required error or MFA-scoped access token

                                              +
                                              diff --git a/docs/interfaces/ChallengeResponse.html b/docs/interfaces/ChallengeResponse.html new file mode 100644 index 00000000..8d4a0b85 --- /dev/null +++ b/docs/interfaces/ChallengeResponse.html @@ -0,0 +1,8 @@ +ChallengeResponse | @auth0/auth0-react
                                              @auth0/auth0-react
                                                Preparing search index...

                                                Interface ChallengeResponse

                                                Response from initiating an MFA challenge

                                                +
                                                interface ChallengeResponse {
                                                    bindingMethod?: string;
                                                    challengeType: "otp" | "oob";
                                                    oobCode?: string;
                                                }
                                                Index

                                                Properties

                                                bindingMethod?: string

                                                Binding method for OOB (e.g., 'prompt')

                                                +
                                                challengeType: "otp" | "oob"

                                                Type of challenge created

                                                +
                                                oobCode?: string

                                                Out-of-band code (for OOB challenges)

                                                +
                                                diff --git a/docs/interfaces/EnrollEmailParams.html b/docs/interfaces/EnrollEmailParams.html new file mode 100644 index 00000000..12ff4306 --- /dev/null +++ b/docs/interfaces/EnrollEmailParams.html @@ -0,0 +1,8 @@ +EnrollEmailParams | @auth0/auth0-react
                                                @auth0/auth0-react
                                                  Preparing search index...

                                                  Interface EnrollEmailParams

                                                  Email enrollment parameters

                                                  +
                                                  interface EnrollEmailParams {
                                                      email?: string;
                                                      factorType: "email";
                                                      mfaToken: string;
                                                  }

                                                  Hierarchy

                                                  • EnrollBaseParams
                                                    • EnrollEmailParams
                                                  Index

                                                  Properties

                                                  Properties

                                                  email?: string

                                                  Email address (optional, uses user's email if not provided)

                                                  +
                                                  factorType: "email"

                                                  The factor type for enrollment

                                                  +
                                                  mfaToken: string

                                                  MFA token from mfa_required error

                                                  +
                                                  diff --git a/docs/interfaces/EnrollOtpParams.html b/docs/interfaces/EnrollOtpParams.html new file mode 100644 index 00000000..1eac2e1b --- /dev/null +++ b/docs/interfaces/EnrollOtpParams.html @@ -0,0 +1,6 @@ +EnrollOtpParams | @auth0/auth0-react
                                                  @auth0/auth0-react
                                                    Preparing search index...

                                                    Interface EnrollOtpParams

                                                    OTP (Time-based One-Time Password) enrollment parameters

                                                    +
                                                    interface EnrollOtpParams {
                                                        factorType: "otp";
                                                        mfaToken: string;
                                                    }

                                                    Hierarchy

                                                    • EnrollBaseParams
                                                      • EnrollOtpParams
                                                    Index

                                                    Properties

                                                    Properties

                                                    factorType: "otp"

                                                    The factor type for enrollment

                                                    +
                                                    mfaToken: string

                                                    MFA token from mfa_required error

                                                    +
                                                    diff --git a/docs/interfaces/EnrollPushParams.html b/docs/interfaces/EnrollPushParams.html new file mode 100644 index 00000000..54706de9 --- /dev/null +++ b/docs/interfaces/EnrollPushParams.html @@ -0,0 +1,6 @@ +EnrollPushParams | @auth0/auth0-react
                                                    @auth0/auth0-react
                                                      Preparing search index...

                                                      Interface EnrollPushParams

                                                      Push notification enrollment parameters

                                                      +
                                                      interface EnrollPushParams {
                                                          factorType: "push";
                                                          mfaToken: string;
                                                      }

                                                      Hierarchy

                                                      • EnrollBaseParams
                                                        • EnrollPushParams
                                                      Index

                                                      Properties

                                                      Properties

                                                      factorType: "push"

                                                      The factor type for enrollment

                                                      +
                                                      mfaToken: string

                                                      MFA token from mfa_required error

                                                      +
                                                      diff --git a/docs/interfaces/EnrollSmsParams.html b/docs/interfaces/EnrollSmsParams.html new file mode 100644 index 00000000..c8cc76de --- /dev/null +++ b/docs/interfaces/EnrollSmsParams.html @@ -0,0 +1,8 @@ +EnrollSmsParams | @auth0/auth0-react
                                                      @auth0/auth0-react
                                                        Preparing search index...

                                                        Interface EnrollSmsParams

                                                        SMS enrollment parameters

                                                        +
                                                        interface EnrollSmsParams {
                                                            factorType: "sms";
                                                            mfaToken: string;
                                                            phoneNumber: string;
                                                        }

                                                        Hierarchy

                                                        • EnrollBaseParams
                                                          • EnrollSmsParams
                                                        Index

                                                        Properties

                                                        factorType: "sms"

                                                        The factor type for enrollment

                                                        +
                                                        mfaToken: string

                                                        MFA token from mfa_required error

                                                        +
                                                        phoneNumber: string

                                                        Phone number in E.164 format (required for SMS)

                                                        +
                                                        diff --git a/docs/interfaces/EnrollVoiceParams.html b/docs/interfaces/EnrollVoiceParams.html new file mode 100644 index 00000000..b2e26682 --- /dev/null +++ b/docs/interfaces/EnrollVoiceParams.html @@ -0,0 +1,8 @@ +EnrollVoiceParams | @auth0/auth0-react
                                                        @auth0/auth0-react
                                                          Preparing search index...

                                                          Interface EnrollVoiceParams

                                                          Voice enrollment parameters

                                                          +
                                                          interface EnrollVoiceParams {
                                                              factorType: "voice";
                                                              mfaToken: string;
                                                              phoneNumber: string;
                                                          }

                                                          Hierarchy

                                                          • EnrollBaseParams
                                                            • EnrollVoiceParams
                                                          Index

                                                          Properties

                                                          factorType: "voice"

                                                          The factor type for enrollment

                                                          +
                                                          mfaToken: string

                                                          MFA token from mfa_required error

                                                          +
                                                          phoneNumber: string

                                                          Phone number in E.164 format (required for voice)

                                                          +
                                                          diff --git a/docs/interfaces/EnrollmentFactor.html b/docs/interfaces/EnrollmentFactor.html new file mode 100644 index 00000000..26ffde1e --- /dev/null +++ b/docs/interfaces/EnrollmentFactor.html @@ -0,0 +1,4 @@ +EnrollmentFactor | @auth0/auth0-react
                                                          @auth0/auth0-react
                                                            Preparing search index...

                                                            Interface EnrollmentFactor

                                                            Enrollment factor returned by getEnrollmentFactors

                                                            +
                                                            interface EnrollmentFactor {
                                                                type: string;
                                                            }
                                                            Index

                                                            Properties

                                                            Properties

                                                            type: string

                                                            Type of enrollment factor available

                                                            +
                                                            diff --git a/docs/interfaces/GetTokenWithPopupOptions.html b/docs/interfaces/GetTokenWithPopupOptions.html index b6df4585..a8a7039f 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 36412a2b..ca29bafc 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/MfaApiClient.html b/docs/interfaces/MfaApiClient.html new file mode 100644 index 00000000..4afe94ba --- /dev/null +++ b/docs/interfaces/MfaApiClient.html @@ -0,0 +1,95 @@ +MfaApiClient | @auth0/auth0-react
                                                                    @auth0/auth0-react
                                                                      Preparing search index...

                                                                      Interface MfaApiClient

                                                                      Client for Auth0 MFA API operations

                                                                      +

                                                                      Manages multi-factor authentication including:

                                                                      +
                                                                        +
                                                                      • Listing enrolled authenticators
                                                                      • +
                                                                      • Enrolling new authenticators (OTP, SMS, Voice, Push, Email)
                                                                      • +
                                                                      • Initiating MFA challenges
                                                                      • +
                                                                      • Verifying MFA challenges
                                                                      • +
                                                                      +

                                                                      This is a wrapper around auth0-auth-js MfaClient that maintains +backward compatibility with the existing spa-js API.

                                                                      +

                                                                      MFA context (scope, audience) is stored internally keyed by mfaToken, +enabling concurrent MFA flows without state conflicts.

                                                                      +
                                                                      try {
                                                                      await auth0.getTokenSilently({ authorizationParams: { audience: 'https://api.example.com' } });
                                                                      } catch (e) {
                                                                      if (e instanceof MfaRequiredError) {
                                                                      // SDK automatically stores context for this mfaToken
                                                                      const authenticators = await auth0.mfa.getAuthenticators({ mfaToken: e.mfa_token });
                                                                      // ... complete MFA flow
                                                                      }
                                                                      } +
                                                                      + +
                                                                      interface MfaApiClient {
                                                                          challenge(
                                                                              params: ChallengeAuthenticatorParams,
                                                                          ): Promise<ChallengeResponse>;
                                                                          enroll(params: EnrollParams): Promise<EnrollmentResponse>;
                                                                          getAuthenticators(mfaToken: string): Promise<Authenticator[]>;
                                                                          getEnrollmentFactors(mfaToken: string): Promise<EnrollmentFactor[]>;
                                                                          setMFAAuthDetails(
                                                                              mfaToken: string,
                                                                              scope?: string,
                                                                              audience?: string,
                                                                              mfaRequirements?: MfaRequirements,
                                                                          ): void;
                                                                          verify(params: VerifyParams): Promise<TokenEndpointResponse>;
                                                                      }
                                                                      Index

                                                                      Methods

                                                                      • Initiates an MFA challenge

                                                                        +

                                                                        Sends OTP via SMS, initiates push notification, or prepares for OTP entry

                                                                        +

                                                                        Parameters

                                                                        Returns Promise<ChallengeResponse>

                                                                        Challenge response with oobCode if applicable

                                                                        +

                                                                        If challenge initiation fails

                                                                        +
                                                                        const challenge = await mfa.challenge({
                                                                        mfaToken: mfaTokenFromLogin,
                                                                        challengeType: 'otp',
                                                                        authenticatorId: 'otp|dev_xxx'
                                                                        });
                                                                        // User enters OTP from their authenticator app +
                                                                        + +
                                                                        const challenge = await mfa.challenge({
                                                                        mfaToken: mfaTokenFromLogin,
                                                                        challengeType: 'oob',
                                                                        authenticatorId: 'sms|dev_xxx'
                                                                        });
                                                                        console.log(challenge.oobCode); // Use for verification +
                                                                        + +
                                                                      • Enrolls a new MFA authenticator

                                                                        +

                                                                        Requires MFA access token with 'enroll' scope

                                                                        +

                                                                        Parameters

                                                                        • params: EnrollParams

                                                                          Enrollment parameters including mfaToken and factorType

                                                                          +

                                                                        Returns Promise<EnrollmentResponse>

                                                                        Enrollment response with authenticator details

                                                                        +

                                                                        If enrollment fails

                                                                        +
                                                                        const enrollment = await mfa.enroll({
                                                                        mfaToken: mfaToken,
                                                                        factorType: 'otp'
                                                                        });
                                                                        console.log(enrollment.secret); // Base32 secret
                                                                        console.log(enrollment.barcodeUri); // QR code URI +
                                                                        + +
                                                                        const enrollment = await mfa.enroll({
                                                                        mfaToken: mfaToken,
                                                                        factorType: 'sms',
                                                                        phoneNumber: '+12025551234'
                                                                        }); +
                                                                        + +
                                                                      • Gets enrolled MFA authenticators filtered by challenge types from context.

                                                                        +

                                                                        Challenge types are automatically resolved from the stored MFA context +(set when mfa_required error occurred).

                                                                        +

                                                                        Parameters

                                                                        • mfaToken: string

                                                                          MFA token from mfa_required error

                                                                          +

                                                                        Returns Promise<Authenticator[]>

                                                                        Array of enrolled authenticators matching the challenge types

                                                                        +

                                                                        If the request fails or context not found

                                                                        +
                                                                        try {
                                                                        await auth0.getTokenSilently();
                                                                        } catch (e) {
                                                                        if (e instanceof MfaRequiredError) {
                                                                        // SDK automatically uses challenge types from error context
                                                                        const authenticators = await auth0.mfa.getAuthenticators(e.mfa_token);
                                                                        }
                                                                        } +
                                                                        + +
                                                                      • Gets available MFA enrollment factors from the stored context.

                                                                        +

                                                                        This method exposes the enrollment options from the mfa_required error's +mfaRequirements.enroll array, eliminating the need for manual parsing.

                                                                        +

                                                                        Parameters

                                                                        • mfaToken: string

                                                                          MFA token from mfa_required error

                                                                          +

                                                                        Returns Promise<EnrollmentFactor[]>

                                                                        Array of enrollment factors available for the user (empty array if no enrollment required)

                                                                        +

                                                                        If MFA context not found

                                                                        +
                                                                        try {
                                                                        await auth0.getTokenSilently();
                                                                        } catch (error) {
                                                                        if (error.error === 'mfa_required') {
                                                                        // Get enrollment options from SDK
                                                                        const enrollOptions = await auth0.mfa.getEnrollmentFactors(error.mfa_token);
                                                                        // [{ type: 'otp' }, { type: 'phone' }, { type: 'push-notification' }]

                                                                        showEnrollmentOptions(enrollOptions);
                                                                        }
                                                                        } +
                                                                        + +
                                                                        try {
                                                                        const factors = await auth0.mfa.getEnrollmentFactors(mfaToken);
                                                                        if (factors.length > 0) {
                                                                        // User needs to enroll in MFA
                                                                        renderEnrollmentUI(factors);
                                                                        } else {
                                                                        // No enrollment required, proceed with challenge
                                                                        }
                                                                        } catch (error) {
                                                                        if (error instanceof MfaEnrollmentFactorsError) {
                                                                        console.error('Context not found:', error.error_description);
                                                                        }
                                                                        } +
                                                                        + +
                                                                      • Internal

                                                                        Stores authentication details (scope, audience, and MFA requirements) for MFA token verification. +This is automatically called by Auth0Client when an mfa_required error occurs.

                                                                        +

                                                                        The context is stored keyed by the MFA token, enabling concurrent MFA flows.

                                                                        +

                                                                        Parameters

                                                                        • mfaToken: string

                                                                          The MFA token from the mfa_required error response

                                                                          +
                                                                        • Optionalscope: string

                                                                          The OAuth scope from the original request (optional)

                                                                          +
                                                                        • Optionalaudience: string

                                                                          The API audience from the original request (optional)

                                                                          +
                                                                        • OptionalmfaRequirements: MfaRequirements

                                                                          The MFA requirements from the mfa_required error (optional)

                                                                          +

                                                                        Returns void

                                                                      • Verifies an MFA challenge and completes authentication

                                                                        +

                                                                        The scope and audience are retrieved from the stored context (set when the +mfa_required error occurred). The grant_type is automatically inferred from +which verification field is provided (otp, oobCode, or recoveryCode).

                                                                        +

                                                                        Parameters

                                                                        • params: VerifyParams

                                                                          Verification parameters with OTP, OOB code, or recovery code

                                                                          +

                                                                        Returns Promise<TokenEndpointResponse>

                                                                        Token response with access_token, id_token, refresh_token

                                                                        +

                                                                        If verification fails (invalid code, expired, rate limited)

                                                                        +

                                                                        If MFA context not found

                                                                        +

                                                                        If grant_type cannot be inferred

                                                                        +

                                                                        Rate limits:

                                                                        +
                                                                          +
                                                                        • 10 verification attempts allowed
                                                                        • +
                                                                        • Refreshes at 1 attempt per 6 minutes
                                                                        • +
                                                                        +
                                                                        const tokens = await mfa.verify({
                                                                        mfaToken: mfaTokenFromLogin,
                                                                        otp: '123456'
                                                                        });
                                                                        console.log(tokens.access_token); +
                                                                        + +
                                                                        const tokens = await mfa.verify({
                                                                        mfaToken: mfaTokenFromLogin,
                                                                        oobCode: challenge.oobCode,
                                                                        bindingCode: '123456' // Code user received via SMS
                                                                        }); +
                                                                        + +
                                                                        const tokens = await mfa.verify({
                                                                        mfaToken: mfaTokenFromLogin,
                                                                        recoveryCode: 'XXXX-XXXX-XXXX'
                                                                        }); +
                                                                        + +
                                                                      diff --git a/docs/interfaces/PopupLoginOptions.html b/docs/interfaces/PopupLoginOptions.html index 1aad72db..b35ecba9 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 9957dbb3..026251f0 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/VerifyParams.html b/docs/interfaces/VerifyParams.html new file mode 100644 index 00000000..42d0cb9f --- /dev/null +++ b/docs/interfaces/VerifyParams.html @@ -0,0 +1,18 @@ +VerifyParams | @auth0/auth0-react
                                                                              @auth0/auth0-react
                                                                                Preparing search index...

                                                                                Interface VerifyParams

                                                                                Parameters for verifying an MFA challenge.

                                                                                +

                                                                                The grant_type is automatically inferred from which verification field is provided:

                                                                                +
                                                                                  +
                                                                                • otp field → MFA-OTP grant type
                                                                                • +
                                                                                • oobCode field → MFA-OOB grant type
                                                                                • +
                                                                                • recoveryCode field → MFA-RECOVERY-CODE grant type
                                                                                • +
                                                                                +
                                                                                interface VerifyParams {
                                                                                    bindingCode?: string;
                                                                                    mfaToken: string;
                                                                                    oobCode?: string;
                                                                                    otp?: string;
                                                                                    recoveryCode?: string;
                                                                                }
                                                                                Index

                                                                                Properties

                                                                                bindingCode?: string

                                                                                Binding code (for OOB challenges with binding)

                                                                                +
                                                                                mfaToken: string

                                                                                MFA token from challenge flow

                                                                                +
                                                                                oobCode?: string

                                                                                Out-of-band code (for OOB challenges)

                                                                                +
                                                                                otp?: string

                                                                                One-time password (for OTP challenges)

                                                                                +
                                                                                recoveryCode?: string

                                                                                Recovery code (for recovery code verification)

                                                                                +
                                                                                diff --git a/docs/interfaces/WithAuth0Props.html b/docs/interfaces/WithAuth0Props.html index 8cffca76..03416b3a 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..6cbafac6 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 ff2c5d41..088909e6 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 2d0281f1..6f78ea5f 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..deb31ec9 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/EnrollParams.html b/docs/types/EnrollParams.html new file mode 100644 index 00000000..bdc536a2 --- /dev/null +++ b/docs/types/EnrollParams.html @@ -0,0 +1,2 @@ +EnrollParams | @auth0/auth0-react
                                                                                            @auth0/auth0-react
                                                                                              Preparing search index...

                                                                                              Type Alias EnrollParams

                                                                                              EnrollParams:
                                                                                                  | EnrollOtpParams
                                                                                                  | EnrollSmsParams
                                                                                                  | EnrollVoiceParams
                                                                                                  | EnrollEmailParams
                                                                                                  | EnrollPushParams

                                                                                              Union type for all enrollment parameter types

                                                                                              +
                                                                                              diff --git a/docs/types/EnrollmentResponse.html b/docs/types/EnrollmentResponse.html new file mode 100644 index 00000000..6192d892 --- /dev/null +++ b/docs/types/EnrollmentResponse.html @@ -0,0 +1,2 @@ +EnrollmentResponse | @auth0/auth0-react
                                                                                              @auth0/auth0-react
                                                                                                Preparing search index...

                                                                                                Type Alias EnrollmentResponse

                                                                                                EnrollmentResponse: OtpEnrollmentResponse | OobEnrollmentResponse

                                                                                                Union type for all enrollment response types

                                                                                                +
                                                                                                diff --git a/docs/types/MfaFactorType.html b/docs/types/MfaFactorType.html new file mode 100644 index 00000000..0b5f0488 --- /dev/null +++ b/docs/types/MfaFactorType.html @@ -0,0 +1,2 @@ +MfaFactorType | @auth0/auth0-react
                                                                                                @auth0/auth0-react
                                                                                                  Preparing search index...

                                                                                                  Type Alias MfaFactorType

                                                                                                  MfaFactorType: "otp" | "sms" | "email" | "push" | "voice"

                                                                                                  Supported MFA factors for enrollment

                                                                                                  +
                                                                                                  diff --git a/docs/variables/Auth0Context.html b/docs/variables/Auth0Context.html index caf97bff..123a4276 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",