diff --git a/.version b/.version index fa49670c..d80b4a81 100644 --- a/.version +++ b/.version @@ -1 +1 @@ -v2.4.0 \ No newline at end of file +v2.5.0 \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 90c5bd11..ed7ba15f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Change Log +## [v2.5.0](https://github.com/auth0/auth0-react/tree/v2.5.0) (2025-09-17) +[Full Changelog](https://github.com/auth0/auth0-react/compare/v2.4.0...v2.5.0) + +**Added** +- Add support for DPoP [\#869](https://github.com/auth0/auth0-react/pull/869) ([martinml](https://github.com/martinml)) + ## [v2.4.0](https://github.com/auth0/auth0-react/tree/v2.4.0) (2025-07-22) [Full Changelog](https://github.com/auth0/auth0-react/compare/v2.3.0...v2.4.0) diff --git a/docs/assets/hierarchy.js b/docs/assets/hierarchy.js index 2bfc7f55..5a7312df 100644 --- a/docs/assets/hierarchy.js +++ b/docs/assets/hierarchy.js @@ -1 +1 @@ -window.hierarchyData = "eJyVlF1rgzAUhv/LuU5XjekavRtljEHHRlfYRelFiMcaapMuiVfF/z60bNivmV4J+hyf9+QcPYA1xjvIVoxTQnlCYp6uCVgsKpReGe0gO0DM0/aixQ4hgw+zr/dzs1H6fX9ECGyVziGjk0cCta0gA6U92kJIdOML/qH0uwoIyEo4Bxl4l4/aF4z+itqHpapyixqyVZyydUMgTlkvxQv6pdmi/lK+7AxhYW6VBWRqCFCe9CK8zoQscUB4hO5tOYlo23IS0Z5vbqSoPr2xYoOn6pjyX3VnQDe+gG9GON5obTTq2ZZqh6b2z9Ya+5+ozw04TltMedci60/1rRAL/K6VxXxQfM4GNDil53s8E1piVQXoruABxpSfG0PP9QIetjHaP8un2peovZKi3fBB3xU8wDg5mZ5yTunNAguLruy+s+Ep3qgJcHN68j/QaJUc9PW5u9aVRiRhjCRTShhlhE3YummaH8/hv8o=" \ No newline at end of file +window.hierarchyData = "eJyVlMtOwzAQRf9l1oYmsR252SFACImXCogFYmG508YitYPtrKr+O0oqkPvCYRUpOZMz1zPJGpy1wUP1znNBaD4lRcE/CDhcNKiCtsZDtYai4P3FyBVCBU+27do7u9Tmsd0iBD61mUNV8JJA5xqoQJuAbiEV+skBf16HVQMEVCO9hwqCn5/1Lzj7Leof1rqZOzRQvRc0+9gQKGgWdXGD4cV+onnToR4M45o5VTaipw0Bmk+jFm4vpaoxIdxC/41MqegjUyoi351VsnkO1skl7qrzQvyoBwP6yQF8soXtjd7Gy8j2oldou3DtnHV/iWIu4diJyCgbIop4qvcLOcOvTjucJ8X7bDogy8T+Hl9Ko7BpRuiO4COMlO0bx57rATzCVsZnedGFGk3QSvYbnvQdwUcYpzvT095rs5zhwqGvh+8sPcUTNWk3z8XO/8Cg0yrpi7n/rCvlJaEiIywThJUZYdOMcDasMGfxkF89XrW2fbBGYbKbAzgVe7P5Bo2A5S4=" \ No newline at end of file diff --git a/docs/assets/navigation.js b/docs/assets/navigation.js index c8a14767..f25d8eec 100644 --- a/docs/assets/navigation.js +++ b/docs/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "eJylll1v0zAUhv+Lr7uxdWxA71CFUKVOq9pNXCAuTHLSWHPtYJ+MFcR/R06W5sMfidzL5rx+Hje2j/P9L0F4RbIgn0vMQSBLKDIpviglFZmRgmJOFiThVGvQ7xyhyxwPnMzIMxMpWVzPP87qNFkQ1OkF0xfwiqAE5eTf7GT7CgIUSzyabjWOvxL3cJDquKRJDragV44zrGVC+Q6lonvwWKxInOk+o1v4VTIFqed9DRORHqY1E/stZAp0/iifwbcNfMk474PZVR5TW7PYHcJGFmWxpCIBzr0vyRGKm28FemQHkCWGXN1InCksOZ//pMHBNU/jeGaxrpZSmJ8rgaAymnTOBWse1Y3ESval89u7IXqj5AtLQT0Upv1oP3kQHANLxf5UHW1DFT34uYOchZ3Y+rA6MTvGQSA/hv6MJ3ue+BvDvNqgU8zDcJx6NeiQHdHK0RknY9Nqjm5uXYsDr+Velhh6P71EaH/VwSfFx2ltKG7WdYeTImP7kMyOnaFbyz0To7ZuKk62hZQpSHDU5wqG1sds8KZnFG5kPzIF1n4jNfdyaMqjo4L9qyh2SLFzuPBYmH719nww9urTh+vbeWd8dfzoT24BTgUnYdKiVQjzFWT+hZPfFOMd3ZukVbxQxczc+zdN33Iz990vLScrRVItQf9e6YPu3ndApYYq6mI0tcDw381ec40/FScA7M0UItppS/HjP4K3Nns=" \ No newline at end of file +window.navigationData = "eJylll1v0zAUhv+LrzvYChvQO1Q+VKljVbuJC8SFcU4Sa64d7JOxgvjvKAlpk/gjkXvZntfP4zj2cb79IQjPSBbkfYk5SOSMIlfyo9ZKkxkpKOZkQZigxoB56Qi9yHEvyIw8cpmQxdX87axJkwVBk1xwcwHPCFpSQf7OjrbPIEFz5tF0q3H8lbyFvdKHJWU52IJeOc6wVoyKHSpNM/BYrEic6TalW/hZcg2JZ72GiUgPN4bLbAupBpPfq0fwbQNfMs57V+0qj+lUs9gdwkYVZbGkkoEQ3kVyhOLmW4Pu+R5UiSFXNxJnCkvO5z8Y+FCo4ouSDDwSKxJtcsMjedW2uFwqWf1cSQSdUtY5gbz9q2lZVrIvnV/fDNEbrZ54AvquqBqd8ZMHwTGw0vx33Ts3VNO9nzvIWdiJTRbrs7njAiSKQ+hhPNnzxF855vVRmGIehuPUq0Ev7ohWjh48GZvUc3Rzm1oceK0yVWJofXqJ0P5qgg9ajNNOobhZN71UyZRnIZkdO0O3VhmXo7ZuKk62hYRrYDjqcwVD76fa4G3PKNzIfmQK7PQ11n4BhKY8OirYv4pihxQ7hwsPRdWv/v8/GHv57s3V9bwzvj5+9IewAMeCkzDppdWI6nuregonvy3GOz4Bshx0s5+Hjl4x3tG9rU6KJ6p5tT7926xveTX33WEnTlpKVr/m/t3VB9287oBKA3XUxWhrgeG/2v3sGn8sTgDYGzZEtNOW4vs/Ayx8aw==" \ No newline at end of file diff --git a/docs/assets/search.js b/docs/assets/search.js index 58631ebd..a27fcf73 100644 --- a/docs/assets/search.js +++ b/docs/assets/search.js @@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indz840Gh8o/95Mw6e1aQZMU+uVAp1M0l3poetC4wC/HW7E+mXR3VItcotGGfuXxtDAFMdIHj9m8DVihCpmqTLLN9vb5+X+5lFjk"; \ No newline at end of file diff --git a/docs/classes/AuthenticationError.html b/docs/classes/AuthenticationError.html index 5aa0e4ad..564dcefb 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/GenericError.html b/docs/classes/GenericError.html index e1fdb9b6..a2f33d03 100644 --- a/docs/classes/GenericError.html +++ b/docs/classes/GenericError.html @@ -1,5 +1,5 @@ GenericError | @auth0/auth0-react
    @auth0/auth0-react
      Preparing search index...

      Class GenericError

      Thrown when network requests to the Auth server fail.

      -

      Hierarchy (View Summary)

      Index

      Constructors

      Hierarchy (View Summary)

      Index

      Constructors

      Properties

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

        Class MfaRequiredError

        Error thrown when the token exchange results in a mfa_required error

        -

        Hierarchy (View Summary)

        Index

        Constructors

        Hierarchy (View Summary)

        Index

        Constructors

        Properties

        error error_description message diff --git a/docs/classes/MissingRefreshTokenError.html b/docs/classes/MissingRefreshTokenError.html index bb8f48de..47599247 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 fe1a0248..9e31978a 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 b5d17409..a6df7f89 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 cd230784..fb5a68eb 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 2845fa31..39ba0ae0 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 new file mode 100644 index 00000000..f61f0552 --- /dev/null +++ b/docs/classes/UseDpopNonceError.html @@ -0,0 +1,16 @@ +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

                    Properties

                    error: string
                    error_description: string
                    message: string
                    name: string
                    newDpopNonce: undefined | 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 GenericError

                    diff --git a/docs/classes/User.html b/docs/classes/User.html index 16662013..d988f522 100644 --- a/docs/classes/User.html +++ b/docs/classes/User.html @@ -1,4 +1,4 @@ -User | @auth0/auth0-react
                    @auth0/auth0-react
                      Preparing search index...

                      Class User

                      Indexable

                      • [key: string]: any
                      Index

                      Constructors

                      constructor +User | @auth0/auth0-react
                      @auth0/auth0-react
                        Preparing search index...

                        Class User

                        Indexable

                        • [key: string]: any
                        Index

                        Constructors

                        Properties

                        Constructors

                        Properties

                        address?: string
                        birthdate?: string
                        email?: string
                        email_verified?: boolean
                        family_name?: string
                        gender?: string
                        given_name?: string
                        locale?: string
                        middle_name?: string
                        name?: string
                        nickname?: string
                        phone_number?: string
                        phone_number_verified?: boolean
                        picture?: string
                        preferred_username?: string
                        profile?: string
                        sub?: string
                        updated_at?: string
                        website?: string
                        zoneinfo?: string
                        +

                        Constructors

                        Properties

                        address?: string
                        birthdate?: string
                        email?: string
                        email_verified?: boolean
                        family_name?: string
                        gender?: string
                        given_name?: string
                        locale?: string
                        middle_name?: string
                        name?: string
                        nickname?: string
                        phone_number?: string
                        phone_number_verified?: boolean
                        picture?: string
                        preferred_username?: string
                        profile?: string
                        sub?: string
                        updated_at?: string
                        website?: string
                        zoneinfo?: string
                        diff --git a/docs/functions/Auth0Provider.html b/docs/functions/Auth0Provider.html index 5a8a8a51..2fe95db0 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 aab84b23..191855f9 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 9a94a284..16cabf62 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 87ffb39f..885c8f90 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

                        Parameters

                        Returns FC<P>

                        diff --git a/docs/hierarchy.html b/docs/hierarchy.html index f1d10527..b622c523 100644 --- a/docs/hierarchy.html +++ b/docs/hierarchy.html @@ -1 +1 @@ -@auth0/auth0-react
                        @auth0/auth0-react
                          Preparing search index...

                          @auth0/auth0-react

                          Hierarchy Summary

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

                            @auth0/auth0-react

                            Hierarchy Summary

                            diff --git a/docs/interfaces/Auth0ContextInterface.html b/docs/interfaces/Auth0ContextInterface.html index 8e81cbba..a9547c79 100644 --- a/docs/interfaces/Auth0ContextInterface.html +++ b/docs/interfaces/Auth0ContextInterface.html @@ -1,7 +1,10 @@ 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> {
                                  error: undefined | Error;
                                  getAccessTokenSilently: {
                                      (
                                          options: GetTokenSilentlyOptions & { detailedResponse: true },
                                      ): Promise<GetTokenSilentlyVerboseResponse>;
                                      (options?: GetTokenSilentlyOptions): Promise<string>;
                                      (
                                          options: GetTokenSilentlyOptions,
                                      ): Promise<string | GetTokenSilentlyVerboseResponse>;
                                  };
                                  getAccessTokenWithPopup: (
                                      options?: GetTokenWithPopupOptions,
                                      config?: PopupConfigOptions,
                                  ) => Promise<undefined | string>;
                                  getIdTokenClaims: () => Promise<undefined | IdToken>;
                                  handleRedirectCallback: (url?: string) => Promise<RedirectLoginResult<any>>;
                                  isAuthenticated: boolean;
                                  isLoading: boolean;
                                  loginWithPopup: (
                                      options?: PopupLoginOptions,
                                      config?: PopupConfigOptions,
                                  ) => Promise<void>;
                                  loginWithRedirect: (
                                      options?: RedirectLoginOptions<AppState>,
                                  ) => Promise<void>;
                                  logout: (options?: LogoutOptions) => Promise<void>;
                                  user: undefined | TUser;
                              }

                              Type Parameters

                              Hierarchy

                              • AuthState<TUser>
                                • Auth0ContextInterface
                              Index

                              Properties

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

                              Type Parameters

                              Hierarchy

                              • AuthState<TUser>
                                • Auth0ContextInterface
                              Index

                              Properties

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

                              Properties

                              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.

                              +

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

                              +

                              Type declaration

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

                                  +

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

                                  +

                                  Type Parameters

                                  • TOutput extends CustomFetchMinimalOutput = Response

                                  Parameters

                                  Returns Fetcher<TOutput>

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

                              Returns a string to be used to demonstrate possession of the private +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);
                               

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

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

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

                              Get an access token interactively.

                              @@ -37,16 +57,31 @@ 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.

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

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

                              +

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

                              +

                              It requires enabling the Auth0ClientOptions.useDpop option.

                              +

                              Type declaration

                                • (id?: string): Promise<undefined | string>
                                • Returns the current DPoP nonce used for making requests to Auth0.

                                  +

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

                                  +

                                  It requires enabling the Auth0ClientOptions.useDpop option.

                                  +

                                  Parameters

                                  • Optionalid: string

                                    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.

                                    +

                                  Returns Promise<undefined | string>

                              The nonce value.

                              +

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

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

                              Returns all claims from the id_token if available.

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

                              After the browser redirects back to the callback page, +

                              handleRedirectCallback: (url?: string) => Promise<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<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<RedirectLoginResult<any>>

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

                              Returns Promise<RedirectLoginResult<any>>

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

                              Opens a popup with the /authorize URL using the parameters @@ -56,17 +91,29 @@

                              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.

                              -
                              user: undefined | TUser
                              +
                              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.

                                  +

                                  Parameters

                                  • nonce: string

                                    The nonce value.

                                    +
                                  • Optionalid: string

                                    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.

                                    +

                                  Returns Promise<void>

                              The nonce value.

                              +

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

                              +
                              user: undefined | TUser
                              diff --git a/docs/interfaces/Auth0ProviderOptions.html b/docs/interfaces/Auth0ProviderOptions.html index b20023ce..50a221a2 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?: AuthorizationParams;
                                    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;
                                    useFormData?: 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?: AuthorizationParams;
                                    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;
                                    useRefreshTokens?: boolean;
                                    useRefreshTokensFallback?: boolean;
                                    workerUrl?: string;
                                }

                                Type Parameters

                                Hierarchy

                                • Auth0ClientOptions
                                  • Auth0ProviderOptions
                                Index

                                Properties

                                auth0Client?: { env?: { [key: string]: string }; name: string; version: string }

                                Internal property to send information about the client to the authorization server.

                                -
                                authorizationParams?: AuthorizationParams

                                URL parameters that will be sent back to the Authorization Server. This can be known parameters +

                                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.

                                -
                                authorizeTimeoutInSeconds?: number

                                A maximum number of seconds to wait before declaring background calls to /authorize as failed for timeout +

                                authorizeTimeoutInSeconds?: number

                                A maximum number of seconds to wait before declaring background calls to /authorize as failed for timeout Defaults to 60s.

                                -
                                cache?: ICache

                                Specify a custom cache implementation to use for token storage and retrieval. This setting takes precedence over cacheLocation if they are both specified.

                                -
                                cacheLocation?: CacheLocation

                                The location to use when storing cache data. Valid values are memory or localstorage. +

                                cache?: ICache

                                Specify a custom cache implementation to use for token storage and retrieval. This setting takes precedence over cacheLocation if they are both specified.

                                +
                                cacheLocation?: CacheLocation

                                The location to use when storing cache data. Valid values are memory or localstorage. The default setting is memory.

                                Read more about changing storage options in the Auth0 docs

                                -
                                children?: ReactNode

                                The child nodes your Provider has wrapped

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

                                +
                                children?: ReactNode

                                The child nodes your Provider has wrapped

                                +
                                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 auth state and methods specifically tied to the provider that the context belongs to.

                                @@ -46,51 +47,55 @@ 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.

                                To keep a user logged in across multiple subdomains set this to your top-level domain and prefixed with a . (eg: .example.com).

                                -
                                domain: string

                                Your Auth0 account domain such as 'example.auth0.com', +

                                domain: string

                                Your Auth0 account domain such as 'example.auth0.com', 'example.eu.auth0.com' or , 'example.mycompany.com' (when using custom domains)

                                -
                                httpTimeoutInSeconds?: number

                                Specify the timeout for HTTP calls using fetch. The default is 10 seconds.

                                -
                                issuer?: string

                                The issuer to be used for validation of JWTs, optionally defaults to the domain above

                                -
                                leeway?: number

                                The value in seconds used to account for clock skew in JWT expirations. +

                                httpTimeoutInSeconds?: number

                                Specify the timeout for HTTP calls using fetch. The default is 10 seconds.

                                +
                                issuer?: string

                                The issuer to be used for validation of JWTs, optionally defaults to the domain above

                                +
                                leeway?: number

                                The value in seconds used to account for clock skew in JWT expirations. Typically, this value is no more than a minute or two at maximum. Defaults to 60s.

                                -
                                legacySameSiteCookie?: boolean

                                Sets an additional cookie with no SameSite attribute to support legacy browsers +

                                legacySameSiteCookie?: boolean

                                Sets an additional cookie with no SameSite attribute to support legacy browsers that are not compatible with the latest SameSite changes. This will log a warning on modern browsers, you can disable the warning by setting this to false but be aware that some older useragents will not work, See https://www.chromium.org/updates/same-site/incompatible-clients Defaults to true

                                -
                                nowProvider?: () => number | Promise<number>

                                Modify the value used as the current time during the token validation.

                                +
                                nowProvider?: () => number | Promise<number>

                                Modify the value used as the current time during the token validation.

                                Note: Using this improperly can potentially compromise the token validation.

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

                                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 +

                                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 instances you can instruct the client to ignore them eg

                                <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 may end up spanning across multiple tabs (e.g. magic links) or you cannot otherwise rely on session storage being available.

                                -
                                useFormData?: boolean

                                If true, data to the token endpoint is transmitted as x-www-form-urlencoded data, if false it will be transmitted as JSON. The default setting is true.

                                +
                                useDpop?: boolean

                                If true, DPoP (OAuth 2.0 Demonstrating Proof of Possession, RFC9449) +will be used to cryptographically bind tokens to this specific browser +so they can't be used from a different device in case of a leak.

                                +

                                The default setting is false.

                                +
                                useFormData?: boolean

                                If true, data to the token endpoint is transmitted as x-www-form-urlencoded data, if false it will be transmitted as JSON. The default setting is true.

                                Note: Setting this to false may affect you if you use Auth0 Rules and are sending custom, non-primitive data. If you disable this, please verify that your Auth0 Rules continue to work as intended.

                                -
                                useRefreshTokens?: boolean

                                If true, refresh tokens are used to fetch new access tokens from the Auth0 server. If false, the legacy technique of using a hidden iframe and the authorization_code grant with prompt=none is used. +

                                useRefreshTokens?: boolean

                                If true, refresh tokens are used to fetch new access tokens from the Auth0 server. If false, the legacy technique of using a hidden iframe and the authorization_code grant with prompt=none is used. The default setting is false.

                                Note: Use of refresh tokens must be enabled by an administrator on your Auth0 client application.

                                -
                                useRefreshTokensFallback?: boolean

                                If true, fallback to the technique of using a hidden iframe and the authorization_code grant with prompt=none when unable to use refresh tokens. If false, the iframe fallback is not used and +

                                useRefreshTokensFallback?: boolean

                                If true, fallback to the technique of using a hidden iframe and the authorization_code grant with prompt=none when unable to use refresh tokens. If false, the iframe fallback is not used and errors relating to a failed refresh_token grant should be handled appropriately. The default setting is false.

                                Note: There might be situations where doing silent auth with a Web Message response from an iframe is not possible, like when you're serving your application from the file system or a custom protocol (like in a Desktop or Native app). @@ -99,9 +104,9 @@

                                let token: string;
                                try {
                                token = await auth0.getTokenSilently();
                                } catch (e) {
                                if (e.error === 'missing_refresh_token' || e.error === 'invalid_grant') {
                                auth0.loginWithRedirect();
                                }
                                }
                                -
                                workerUrl?: string

                                If provided, the SDK will load the token worker from this URL instead of the integrated blob. An example of when this is useful is if you have strict +

                                workerUrl?: string

                                If provided, the SDK will load the token worker from this URL instead of the integrated blob. An example of when this is useful is if you have strict Content-Security-Policy (CSP) and wish to avoid needing to set worker-src: blob:. We recommend either serving the worker, which you can find in the module at <module_path>/dist/auth0-spa-js.worker.production.js, from the same host as your application or using the Auth0 CDN https://cdn.auth0.com/js/auth0-spa-js/<version>/auth0-spa-js.worker.production.js.

                                Note: The worker is only used when useRefreshTokens: true, cacheLocation: 'memory', and the cache is not custom.

                                -
                                +
                                diff --git a/docs/interfaces/AuthorizationParams.html b/docs/interfaces/AuthorizationParams.html index a40c5611..9e852fb2 100644 --- a/docs/interfaces/AuthorizationParams.html +++ b/docs/interfaces/AuthorizationParams.html @@ -1,6 +1,6 @@ AuthorizationParams | @auth0/auth0-react
                                @auth0/auth0-react
                                  Preparing search index...

                                  Interface AuthorizationParams

                                  interface AuthorizationParams {
                                      acr_values?: string;
                                      audience?: string;
                                      connection?: string;
                                      display?: "page" | "popup" | "touch" | "wap";
                                      id_token_hint?: string;
                                      invitation?: string;
                                      login_hint?: string;
                                      max_age?: string | number;
                                      organization?: string;
                                      prompt?: "none" | "login" | "consent" | "select_account";
                                      redirect_uri?: string;
                                      scope?: string;
                                      screen_hint?: string;
                                      ui_locales?: string;
                                      [key: string]: any;
                                  }

                                  Indexable

                                  • [key: string]: any

                                    If you need to send custom parameters to the Authorization Server, make sure to use the original parameter name.

                                    -
                                  Index

                                  Properties

                                  Index

                                  Properties

                                  acr_values?: string
                                  audience?: string

                                  The default audience to be used for requesting API access.

                                  -
                                  connection?: string

                                  The name of the connection configured for your application. +

                                  Properties

                                  acr_values?: string
                                  audience?: string

                                  The default audience to be used for requesting API access.

                                  +
                                  connection?: string

                                  The name of the connection configured for your application. If null, it will redirect to the Auth0 Login Page and show the Login Widget.

                                  -
                                  display?: "page" | "popup" | "touch" | "wap"
                                    +
                                  display?: "page" | "popup" | "touch" | "wap"
                                  • 'page': displays the UI with a full page view
                                  • 'popup': displays the UI with a popup window
                                  • 'touch': displays the UI in a way that leverages a touch interface
                                  • 'wap': displays the UI with a "feature phone" type interface
                                  -
                                  id_token_hint?: string

                                  Previously issued ID Token.

                                  -
                                  invitation?: string

                                  The Id of an invitation to accept. This is available from the user invitation URL that is given when participating in a user invitation flow.

                                  -
                                  login_hint?: string

                                  The user's email address or other identifier. When your app knows +

                                  id_token_hint?: string

                                  Previously issued ID Token.

                                  +
                                  invitation?: string

                                  The Id of an invitation to accept. This is available from the user invitation URL that is given when participating in a user invitation flow.

                                  +
                                  login_hint?: string

                                  The user's email address or other identifier. When your app knows which user is trying to authenticate, you can provide this parameter to pre-fill the email box or select the right session for sign-in.

                                  This currently only affects the classic Lock experience.

                                  -
                                  max_age?: string | number

                                  Maximum allowable elapsed time (in seconds) since authentication. +

                                  max_age?: string | number

                                  Maximum allowable elapsed time (in seconds) since authentication. If the last time the user authenticated is greater than this value, the user must be reauthenticated.

                                  -
                                  organization?: string

                                  The organization to log in to.

                                  +
                                  organization?: string

                                  The organization to log in to.

                                  This will specify an organization parameter in your user's login request.

                                  • If you provide an Organization ID (a string with the prefix org_), it will be validated against the org_id claim of your user's ID Token. The validation is case-sensitive.
                                  • @@ -41,25 +41,25 @@ To use an Organization Name you must have "Allow Organization Names in Authentication API" switched on in your Auth0 settings dashboard. More information is available on the Auth0 documentation portal
                                  -
                                  prompt?: "none" | "login" | "consent" | "select_account"
                                    +
                                  prompt?: "none" | "login" | "consent" | "select_account"
                                  • 'none': do not prompt user for login or consent on reauthentication
                                  • 'login': prompt user for reauthentication
                                  • 'consent': prompt user for consent before processing request
                                  • 'select_account': prompt user to select an account
                                  -
                                  redirect_uri?: string

                                  The default URL where Auth0 will redirect your browser to with +

                                  redirect_uri?: string

                                  The default URL where Auth0 will redirect your browser to with the authentication result. It must be whitelisted in the "Allowed Callback URLs" field in your Auth0 Application's settings. If not provided here, it should be provided in the other methods that provide authentication.

                                  -
                                  scope?: string

                                  The default scope to be used on authentication requests.

                                  +
                                  scope?: string

                                  The default scope to be used on authentication requests.

                                  This defaults to profile email if not set. If you are setting extra scopes and require profile and email to be included then you must include them in the provided scope.

                                  Note: The openid scope is always applied regardless of this setting.

                                  -
                                  screen_hint?: string

                                  Provides a hint to Auth0 as to what flow should be displayed. +

                                  screen_hint?: string

                                  Provides a hint to Auth0 as to what flow should be displayed. The default behavior is to show a login page but you can override this by passing 'signup' to show the signup page instead.

                                  This only affects the New Universal Login Experience.

                                  -
                                  ui_locales?: string

                                  The space-separated list of language tags, ordered by preference. +

                                  ui_locales?: string

                                  The space-separated list of language tags, ordered by preference. For example: 'fr-CA fr en'.

                                  -
                                  +
                                  diff --git a/docs/interfaces/GetTokenSilentlyOptions.html b/docs/interfaces/GetTokenSilentlyOptions.html index ace8ec54..64eeff87 100644 --- a/docs/interfaces/GetTokenSilentlyOptions.html +++ b/docs/interfaces/GetTokenSilentlyOptions.html @@ -1,4 +1,4 @@ -GetTokenSilentlyOptions | @auth0/auth0-react
                                  @auth0/auth0-react
                                    Preparing search index...

                                    Interface GetTokenSilentlyOptions

                                    interface GetTokenSilentlyOptions {
                                        authorizationParams?: {
                                            audience?: string;
                                            redirect_uri?: string;
                                            scope?: string;
                                            [key: string]: any;
                                        };
                                        cacheMode?: "on"
                                        | "off"
                                        | "cache-only";
                                        detailedResponse?: boolean;
                                        timeoutInSeconds?: number;
                                    }
                                    Index

                                    Properties

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

                                      Interface GetTokenSilentlyOptions

                                      interface GetTokenSilentlyOptions {
                                          authorizationParams?: {
                                              audience?: string;
                                              redirect_uri?: string;
                                              scope?: string;
                                              [key: string]: any;
                                          };
                                          cacheMode?: "on"
                                          | "off"
                                          | "cache-only";
                                          detailedResponse?: boolean;
                                          timeoutInSeconds?: number;
                                      }
                                      Index

                                      Properties

                                      authorizationParams? cacheMode? detailedResponse? timeoutInSeconds? @@ -13,13 +13,13 @@ It must be whitelisted in the "Allowed Web Origins" in your Auth0 Application's settings.

                                    • Optionalscope?: string

                                      The scope that was used in the authentication request

                                      -
                                    • cacheMode?: "on" | "off" | "cache-only"

                                      When off, ignores the cache and always sends a +

                                      cacheMode?: "on" | "off" | "cache-only"

                                      When off, ignores the cache and always sends a request to Auth0. When cache-only, only reads from the cache and never sends a request to Auth0. Defaults to on, where it both reads from the cache and sends a request to Auth0 as needed.

                                      -
                                      detailedResponse?: boolean

                                      If true, the full response from the /oauth/token endpoint (or the cache, if the cache was used) is returned +

                                      detailedResponse?: boolean

                                      If true, the full response from the /oauth/token endpoint (or the cache, if the cache was used) is returned (minus refresh_token if one was issued). Otherwise, just the access token is returned.

                                      The default is false.

                                      -
                                      timeoutInSeconds?: number

                                      A maximum number of seconds to wait before declaring the background /authorize call as failed for timeout +

                                      timeoutInSeconds?: number

                                      A maximum number of seconds to wait before declaring the background /authorize call as failed for timeout Defaults to 60s.

                                      -
                                      +
                                      diff --git a/docs/interfaces/GetTokenWithPopupOptions.html b/docs/interfaces/GetTokenWithPopupOptions.html index 5b79dc30..5c651601 100644 --- a/docs/interfaces/GetTokenWithPopupOptions.html +++ b/docs/interfaces/GetTokenWithPopupOptions.html @@ -1,8 +1,8 @@ -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.

                                          -
                                          cacheMode?: "on" | "off" | "cache-only"

                                          When off, ignores the cache and always sends a request to Auth0. +

                                          cacheMode?: "on" | "off" | "cache-only"

                                          When off, ignores the cache and always sends a request to Auth0. When cache-only, only reads from the cache and never sends a request to Auth0. Defaults to on, where it both reads from the cache and sends a request to Auth0 as needed.

                                          -
                                          +
                                          diff --git a/docs/interfaces/ICache.html b/docs/interfaces/ICache.html index 1cf931f8..fcc029e7 100644 --- a/docs/interfaces/ICache.html +++ b/docs/interfaces/ICache.html @@ -1,5 +1,5 @@ -ICache | @auth0/auth0-react
                                          @auth0/auth0-react
                                            Preparing search index...

                                            Interface ICache

                                            interface ICache {
                                                allKeys(): MaybePromise<string[]>;
                                                get<T = Cacheable>(key: string): MaybePromise<undefined | T>;
                                                remove(key: string): MaybePromise<void>;
                                                set<T = Cacheable>(key: string, entry: T): MaybePromise<void>;
                                            }

                                            Implemented by

                                            Index

                                            Methods

                                            allKeys? +ICache | @auth0/auth0-react
                                            @auth0/auth0-react
                                              Preparing search index...

                                              Interface ICache

                                              interface ICache {
                                                  allKeys(): MaybePromise<string[]>;
                                                  get<T = Cacheable>(key: string): MaybePromise<undefined | T>;
                                                  remove(key: string): MaybePromise<void>;
                                                  set<T = Cacheable>(key: string, entry: T): MaybePromise<void>;
                                              }

                                              Implemented by

                                              Index

                                              Methods

                                              • Returns MaybePromise<string[]>

                                              • Type Parameters

                                                Parameters

                                                • key: string

                                                Returns MaybePromise<undefined | T>

                                              • Parameters

                                                • key: string

                                                Returns MaybePromise<void>

                                              • Type Parameters

                                                Parameters

                                                • key: string
                                                • entry: T

                                                Returns MaybePromise<void>

                                              +

                                              Methods

                                              • Returns MaybePromise<string[]>

                                              • Type Parameters

                                                Parameters

                                                • key: string

                                                Returns MaybePromise<undefined | T>

                                              • Parameters

                                                • key: string

                                                Returns MaybePromise<void>

                                              • Type Parameters

                                                Parameters

                                                • key: string
                                                • entry: T

                                                Returns MaybePromise<void>

                                              diff --git a/docs/interfaces/IdToken.html b/docs/interfaces/IdToken.html index 13b8f880..ff027416 100644 --- a/docs/interfaces/IdToken.html +++ b/docs/interfaces/IdToken.html @@ -1,4 +1,4 @@ -IdToken | @auth0/auth0-react
                                              @auth0/auth0-react
                                                Preparing search index...

                                                Interface IdToken

                                                interface IdToken {
                                                    __raw: string;
                                                    acr?: string;
                                                    address?: string;
                                                    amr?: string[];
                                                    at_hash?: string;
                                                    aud?: string;
                                                    auth_time?: string;
                                                    azp?: string;
                                                    birthdate?: string;
                                                    c_hash?: string;
                                                    cnf?: string;
                                                    email?: string;
                                                    email_verified?: boolean;
                                                    exp?: number;
                                                    family_name?: string;
                                                    gender?: string;
                                                    given_name?: string;
                                                    iat?: number;
                                                    iss?: string;
                                                    jti?: string;
                                                    locale?: string;
                                                    middle_name?: string;
                                                    name?: string;
                                                    nbf?: number;
                                                    nickname?: string;
                                                    nonce?: string;
                                                    org_id?: string;
                                                    org_name?: string;
                                                    phone_number?: string;
                                                    phone_number_verified?: boolean;
                                                    picture?: string;
                                                    preferred_username?: string;
                                                    profile?: string;
                                                    sid?: string;
                                                    sub_jwk?: string;
                                                    updated_at?: string;
                                                    website?: string;
                                                    zoneinfo?: string;
                                                    [key: string]: any;
                                                }

                                                Indexable

                                                • [key: string]: any
                                                Index

                                                Properties

                                                __raw +IdToken | @auth0/auth0-react
                                                @auth0/auth0-react
                                                  Preparing search index...

                                                  Interface IdToken

                                                  interface IdToken {
                                                      __raw: string;
                                                      acr?: string;
                                                      address?: string;
                                                      amr?: string[];
                                                      at_hash?: string;
                                                      aud?: string;
                                                      auth_time?: string;
                                                      azp?: string;
                                                      birthdate?: string;
                                                      c_hash?: string;
                                                      cnf?: string;
                                                      email?: string;
                                                      email_verified?: boolean;
                                                      exp?: number;
                                                      family_name?: string;
                                                      gender?: string;
                                                      given_name?: string;
                                                      iat?: number;
                                                      iss?: string;
                                                      jti?: string;
                                                      locale?: string;
                                                      middle_name?: string;
                                                      name?: string;
                                                      nbf?: number;
                                                      nickname?: string;
                                                      nonce?: string;
                                                      org_id?: string;
                                                      org_name?: string;
                                                      phone_number?: string;
                                                      phone_number_verified?: boolean;
                                                      picture?: string;
                                                      preferred_username?: string;
                                                      profile?: string;
                                                      sid?: string;
                                                      sub_jwk?: string;
                                                      updated_at?: string;
                                                      website?: string;
                                                      zoneinfo?: string;
                                                      [key: string]: any;
                                                  }

                                                  Indexable

                                                  • [key: string]: any
                                                  Index

                                                  Properties

                                                  Properties

                                                  __raw: string
                                                  acr?: string
                                                  address?: string
                                                  amr?: string[]
                                                  at_hash?: string
                                                  aud?: string
                                                  auth_time?: string
                                                  azp?: string
                                                  birthdate?: string
                                                  c_hash?: string
                                                  cnf?: string
                                                  email?: string
                                                  email_verified?: boolean
                                                  exp?: number
                                                  family_name?: string
                                                  gender?: string
                                                  given_name?: string
                                                  iat?: number
                                                  iss?: string
                                                  jti?: string
                                                  locale?: string
                                                  middle_name?: string
                                                  name?: string
                                                  nbf?: number
                                                  nickname?: string
                                                  nonce?: string
                                                  org_id?: string
                                                  org_name?: string
                                                  phone_number?: string
                                                  phone_number_verified?: boolean
                                                  picture?: string
                                                  preferred_username?: string
                                                  profile?: string
                                                  sid?: string
                                                  sub_jwk?: string
                                                  updated_at?: string
                                                  website?: string
                                                  zoneinfo?: string
                                                  +

                                                  Properties

                                                  __raw: string
                                                  acr?: string
                                                  address?: string
                                                  amr?: string[]
                                                  at_hash?: string
                                                  aud?: string
                                                  auth_time?: string
                                                  azp?: string
                                                  birthdate?: string
                                                  c_hash?: string
                                                  cnf?: string
                                                  email?: string
                                                  email_verified?: boolean
                                                  exp?: number
                                                  family_name?: string
                                                  gender?: string
                                                  given_name?: string
                                                  iat?: number
                                                  iss?: string
                                                  jti?: string
                                                  locale?: string
                                                  middle_name?: string
                                                  name?: string
                                                  nbf?: number
                                                  nickname?: string
                                                  nonce?: string
                                                  org_id?: string
                                                  org_name?: string
                                                  phone_number?: string
                                                  phone_number_verified?: boolean
                                                  picture?: string
                                                  preferred_username?: string
                                                  profile?: string
                                                  sid?: string
                                                  sub_jwk?: string
                                                  updated_at?: string
                                                  website?: string
                                                  zoneinfo?: string
                                                  diff --git a/docs/interfaces/LogoutOptions.html b/docs/interfaces/LogoutOptions.html index a05e1792..73cfe7be 100644 --- a/docs/interfaces/LogoutOptions.html +++ b/docs/interfaces/LogoutOptions.html @@ -1,11 +1,11 @@ -LogoutOptions | @auth0/auth0-react
                                                  @auth0/auth0-react
                                                    Preparing search index...

                                                    Interface LogoutOptions

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

                                                    Hierarchy

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

                                                    Properties

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

                                                      Interface LogoutOptions

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

                                                      Hierarchy

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

                                                      Properties

                                                      clientId?: null | string

                                                      The clientId of your application.

                                                      If this property is not set, then the clientId that was used during initialization of the SDK is sent to the logout endpoint.

                                                      If this property is set to null, then no client ID value is sent to the logout endpoint.

                                                      Read more about how redirecting after logout works

                                                      -
                                                      logoutParams?: { federated?: boolean; returnTo?: string; [key: string]: any }

                                                      Parameters to pass to the logout endpoint. This can be known parameters defined by Auth0 or custom parameters +

                                                      logoutParams?: { federated?: boolean; returnTo?: string; [key: string]: any }

                                                      Parameters to pass to the logout endpoint. This can be known parameters defined by Auth0 or custom parameters you wish to provide.

                                                      Type declaration

                                                      • [key: string]: any

                                                        If you need to send custom parameters to the logout endpoint, make sure to use the original parameter name.

                                                      • Optionalfederated?: boolean

                                                        When supported by the upstream identity provider, @@ -20,7 +20,7 @@ returnTo URL must be listed in the "Allowed Logout URLs" at the account level in the Auth0 dashboard.

                                                        Read more about how redirecting after logout works

                                                        -
                                                      openUrl?: false | ((url: string) => void | Promise<void>)

                                                      Used to control the redirect and not rely on the SDK to do the actual redirect.

                                                      +
                                                      openUrl?: false | ((url: string) => void | Promise<void>)

                                                      Used to control the redirect and not rely on the SDK to do the actual redirect.

                                                      Set to false to disable the redirect, or provide a function to handle the actual redirect yourself.

                                                      await auth0.logout({
                                                      openUrl(url) {
                                                      window.location.replace(url);
                                                      }
                                                      });
                                                      @@ -28,4 +28,4 @@
                                                      import { Browser } from '@capacitor/browser';

                                                      await auth0.logout({
                                                      async openUrl(url) {
                                                      await Browser.open({ url });
                                                      }
                                                      });
                                                      -
                                                      +
                                                      diff --git a/docs/interfaces/LogoutUrlOptions.html b/docs/interfaces/LogoutUrlOptions.html index 8a7ca5cc..f5181c56 100644 --- a/docs/interfaces/LogoutUrlOptions.html +++ b/docs/interfaces/LogoutUrlOptions.html @@ -1,10 +1,10 @@ -LogoutUrlOptions | @auth0/auth0-react
                                                      @auth0/auth0-react
                                                        Preparing search index...

                                                        Interface LogoutUrlOptions

                                                        interface LogoutUrlOptions {
                                                            clientId?: null | string;
                                                            logoutParams?: {
                                                                federated?: boolean;
                                                                returnTo?: string;
                                                                [key: string]: any;
                                                            };
                                                        }
                                                        Index

                                                        Properties

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

                                                          Interface LogoutUrlOptions

                                                          interface LogoutUrlOptions {
                                                              clientId?: null | string;
                                                              logoutParams?: {
                                                                  federated?: boolean;
                                                                  returnTo?: string;
                                                                  [key: string]: any;
                                                              };
                                                          }
                                                          Index

                                                          Properties

                                                          clientId?: null | string

                                                          The clientId of your application.

                                                          If this property is not set, then the clientId that was used during initialization of the SDK is sent to the logout endpoint.

                                                          If this property is set to null, then no client ID value is sent to the logout endpoint.

                                                          Read more about how redirecting after logout works

                                                          -
                                                          logoutParams?: { federated?: boolean; returnTo?: string; [key: string]: any }

                                                          Parameters to pass to the logout endpoint. This can be known parameters defined by Auth0 or custom parameters +

                                                          logoutParams?: { federated?: boolean; returnTo?: string; [key: string]: any }

                                                          Parameters to pass to the logout endpoint. This can be known parameters defined by Auth0 or custom parameters you wish to provide.

                                                          Type declaration

                                                          • [key: string]: any

                                                            If you need to send custom parameters to the logout endpoint, make sure to use the original parameter name.

                                                          • Optionalfederated?: boolean

                                                            When supported by the upstream identity provider, @@ -19,4 +19,4 @@ returnTo URL must be listed in the "Allowed Logout URLs" at the account level in the Auth0 dashboard.

                                                            Read more about how redirecting after logout works

                                                            -
                                                          +
                                                          diff --git a/docs/interfaces/PopupConfigOptions.html b/docs/interfaces/PopupConfigOptions.html index d02c2248..28d208cc 100644 --- a/docs/interfaces/PopupConfigOptions.html +++ b/docs/interfaces/PopupConfigOptions.html @@ -1,8 +1,8 @@ -PopupConfigOptions | @auth0/auth0-react
                                                          @auth0/auth0-react
                                                            Preparing search index...

                                                            Interface PopupConfigOptions

                                                            interface PopupConfigOptions {
                                                                popup?: any;
                                                                timeoutInSeconds?: number;
                                                            }
                                                            Index

                                                            Properties

                                                            popup? +PopupConfigOptions | @auth0/auth0-react
                                                            @auth0/auth0-react
                                                              Preparing search index...

                                                              Interface PopupConfigOptions

                                                              interface PopupConfigOptions {
                                                                  popup?: any;
                                                                  timeoutInSeconds?: number;
                                                              }
                                                              Index

                                                              Properties

                                                              popup?: any

                                                              Accepts an already-created popup window to use. If not specified, the SDK will create its own. This may be useful for platforms like iOS that have security restrictions around when popups can be invoked (e.g. from a user click event)

                                                              -
                                                              timeoutInSeconds?: number

                                                              The number of seconds to wait for a popup response before +

                                                              timeoutInSeconds?: number

                                                              The number of seconds to wait for a popup response before throwing a timeout error. Defaults to 60s

                                                              -
                                                              +
                                                              diff --git a/docs/interfaces/PopupLoginOptions.html b/docs/interfaces/PopupLoginOptions.html index af2eb17d..942c0782 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 e314e32b..ed6ca603 100644 --- a/docs/interfaces/RedirectLoginOptions.html +++ b/docs/interfaces/RedirectLoginOptions.html @@ -1,16 +1,16 @@ -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?: TAppState

                                                                      Used to store state before doing the redirect

                                                                      -
                                                                      authorizationParams?: AuthorizationParams

                                                                      URL parameters that will be sent back to the Authorization Server. This can be known parameters +

                                                                      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.

                                                                      -
                                                                      fragment?: string

                                                                      Used to add to the URL fragment before redirecting

                                                                      -
                                                                      openUrl?: (url: string) => void | Promise<void>

                                                                      Used to control the redirect and not rely on the SDK to do the actual redirect.

                                                                      +
                                                                      fragment?: string

                                                                      Used to add to the URL fragment before redirecting

                                                                      +
                                                                      openUrl?: (url: string) => void | Promise<void>

                                                                      Used to control the redirect and not rely on the SDK to do the actual redirect.

                                                                      const client = new Auth0Client({
                                                                      openUrl(url) {
                                                                      window.location.replace(url);
                                                                      }
                                                                      });
                                                                      import { Browser } from '@capacitor/browser';

                                                                      const client = new Auth0Client({
                                                                      async openUrl(url) {
                                                                      await Browser.open({ url });
                                                                      }
                                                                      });
                                                                      -
                                                                      +
                                                                      diff --git a/docs/interfaces/WithAuth0Props.html b/docs/interfaces/WithAuth0Props.html index d80f2eb4..6d19b90d 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 be3c8c0d..886555c4 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 37915723..892db9f4 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 9967e928..29512f1d 100644 --- a/docs/types/AppState.html +++ b/docs/types/AppState.html @@ -1,3 +1,3 @@ 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.

                                                                                -
                                                                                type AppState = {
                                                                                    returnTo?: string;
                                                                                    [key: string]: any;
                                                                                }

                                                                                Indexable

                                                                                • [key: string]: any
                                                                                Index

                                                                                Properties

                                                                                Properties

                                                                                returnTo?: string
                                                                                +
                                                                                type AppState = {
                                                                                    returnTo?: string;
                                                                                    [key: string]: any;
                                                                                }

                                                                                Indexable

                                                                                • [key: string]: any
                                                                                Index

                                                                                Properties

                                                                                Properties

                                                                                returnTo?: string
                                                                                diff --git a/docs/types/CacheLocation.html b/docs/types/CacheLocation.html index 53cf383d..08b27564 100644 --- a/docs/types/CacheLocation.html +++ b/docs/types/CacheLocation.html @@ -1,2 +1,2 @@ CacheLocation | @auth0/auth0-react
                                                                                @auth0/auth0-react
                                                                                  Preparing search index...

                                                                                  Type Alias CacheLocation

                                                                                  CacheLocation: "memory" | "localstorage"

                                                                                  The possible locations where tokens can be stored

                                                                                  -
                                                                                  +
                                                                                  diff --git a/docs/types/Cacheable.html b/docs/types/Cacheable.html index 30262fa8..4378e1b3 100644 --- a/docs/types/Cacheable.html +++ b/docs/types/Cacheable.html @@ -1 +1 @@ -Cacheable | @auth0/auth0-react
                                                                                  @auth0/auth0-react
                                                                                    Preparing search index...

                                                                                    Type Alias Cacheable

                                                                                    Cacheable: WrappedCacheEntry | KeyManifestEntry
                                                                                    +Cacheable | @auth0/auth0-react
                                                                                    @auth0/auth0-react
                                                                                      Preparing search index...

                                                                                      Type Alias Cacheable

                                                                                      Cacheable: WrappedCacheEntry | KeyManifestEntry
                                                                                      diff --git a/docs/types/FetcherConfig.html b/docs/types/FetcherConfig.html new file mode 100644 index 00000000..62625832 --- /dev/null +++ b/docs/types/FetcherConfig.html @@ -0,0 +1,5 @@ +FetcherConfig | @auth0/auth0-react
                                                                                      @auth0/auth0-react
                                                                                        Preparing search index...

                                                                                        Type Alias FetcherConfig<TOutput>

                                                                                        type FetcherConfig<TOutput extends CustomFetchMinimalOutput> = {
                                                                                            baseUrl?: string;
                                                                                            dpopNonceId?: string;
                                                                                            fetch?: CustomFetchImpl<TOutput>;
                                                                                            getAccessToken?: AccessTokenFactory;
                                                                                        }

                                                                                        Type Parameters

                                                                                        • TOutput extends CustomFetchMinimalOutput
                                                                                        Index

                                                                                        Properties

                                                                                        baseUrl?: string
                                                                                        dpopNonceId?: string
                                                                                        fetch?: CustomFetchImpl<TOutput>
                                                                                        getAccessToken?: AccessTokenFactory
                                                                                        diff --git a/docs/variables/Auth0Context.html b/docs/variables/Auth0Context.html index c07ff85c..9407eeb1 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 1ed60ce7..a011eee2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@auth0/auth0-react", - "version": "2.4.0", + "version": "2.5.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@auth0/auth0-react", - "version": "2.4.0", + "version": "2.5.0", "license": "MIT", "dependencies": { "@auth0/auth0-spa-js": "^2.4.1" diff --git a/package.json b/package.json index 1f0b471a..53be7cc5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "author": "Auth0", "name": "@auth0/auth0-react", - "version": "2.4.0", + "version": "2.5.0", "description": "Auth0 SDK for React Single Page Applications (SPA)", "keywords": [ "auth0",