@versini/auth0-react-thin 2.20.0 → 2.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  > **Unofficial, community-maintained fork of [`@auth0/auth0-react`](https://www.npmjs.com/package/@auth0/auth0-react) — NOT affiliated with, endorsed by, sponsored by, or supported by Auth0 or Okta.**
4
4
 
5
- This is [`@auth0/auth0-react@2.20.0`](https://www.npmjs.com/package/@auth0/auth0-react/v/2.20.0)
5
+ This is [`@auth0/auth0-react@2.21.0`](https://www.npmjs.com/package/@auth0/auth0-react/v/2.21.0)
6
6
  rebuilt with a single one-line Rollup change (`external: ['@auth0/auth0-spa-js']`) so it no
7
7
  longer inlines that dependency. That drops ~26 KB gzip of first-paint weight for apps that use
8
8
  only basic Auth0 login (no MFA/Passkey/MyAccount/DPoP). The public runtime API is otherwise
@@ -1,4 +1,4 @@
1
- import { GetTokenSilentlyOptions, GetTokenWithPopupOptions, IdToken, LogoutOptions as SPALogoutOptions, PopupLoginOptions, PopupConfigOptions, RedirectLoginResult, User, GetTokenSilentlyVerboseResponse, RedirectLoginOptions as SPARedirectLoginOptions, type Auth0Client, RedirectConnectAccountOptions, ConnectAccountRedirectResult, CustomTokenExchangeOptions, TokenEndpointResponse, type MfaApiClient, type PasskeyApiClient, type MyAccountApiClient } from '@auth0/auth0-spa-js';
1
+ import { GetTokenSilentlyOptions, GetTokenWithPopupOptions, IdToken, LogoutOptions as SPALogoutOptions, PopupLoginOptions, PopupConfigOptions, RedirectLoginResult, User, GetTokenSilentlyVerboseResponse, RedirectLoginOptions as SPARedirectLoginOptions, type Auth0Client, RedirectConnectAccountOptions, ConnectAccountRedirectResult, CustomTokenExchangeOptions, TokenEndpointResponse, type RevokeRefreshTokenOptions, type MfaApiClient, type PasskeyApiClient, type MyAccountApiClient } from '@auth0/auth0-spa-js';
2
2
  import { AuthState } from './auth-state';
3
3
  import { AppState } from './auth0-provider';
4
4
  export interface LogoutOptions extends Omit<SPALogoutOptions, 'onRedirect'> {
@@ -221,6 +221,22 @@ export interface Auth0ContextInterface<TUser extends User = User> extends AuthSt
221
221
  * [Read more about how Logout works at Auth0](https://auth0.com/docs/logout).
222
222
  */
223
223
  logout: (options?: LogoutOptions) => Promise<void>;
224
+ /**
225
+ * ```js
226
+ * await revokeRefreshToken();
227
+ * // or for a specific audience:
228
+ * await revokeRefreshToken({ audience: 'https://api.example.com' });
229
+ * ```
230
+ *
231
+ * Revokes the refresh token for the current session by calling the
232
+ * `/oauth/revoke` endpoint. Once revoked, the token can no longer be
233
+ * used to obtain new access tokens.
234
+ *
235
+ * If `useRefreshTokens` is not enabled this is a no-op.
236
+ * When multiple audiences share the same refresh token, revoking for
237
+ * one audience invalidates it for all of them.
238
+ */
239
+ revokeRefreshToken: (options?: RevokeRefreshTokenOptions) => Promise<void>;
224
240
  /**
225
241
  * After the browser redirects back to the callback page,
226
242
  * call `handleRedirectCallback` to handle success and error
@@ -401,6 +417,7 @@ export declare const initialContext: {
401
417
  loginWithPopup: () => never;
402
418
  connectAccountWithRedirect: () => never;
403
419
  logout: () => never;
420
+ revokeRefreshToken: () => never;
404
421
  handleRedirectCallback: () => never;
405
422
  getDpopNonce: () => never;
406
423
  setDpopNonce: () => never;
@@ -1 +1 @@
1
- {"version":3,"file":"auth0-context.d.ts","sourceRoot":"","sources":["../src/auth0-context.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,OAAO,EACP,aAAa,IAAI,gBAAgB,EACjC,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,IAAI,EACJ,+BAA+B,EAC/B,oBAAoB,IAAI,uBAAuB,EAC/C,KAAK,WAAW,EAChB,6BAA6B,EAC7B,4BAA4B,EAC5B,0BAA0B,EAC1B,qBAAqB,EACrB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM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AAC,KAAK,CAAC,GACrC,8BAA8B,CAAC,KAAK,CAAC,CAAC;AAoC1C;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,aAAa,GAAI,KAAK,SAAS,IAAI,GAAG,IAAI,EAAE,MAAM,oBAAoB,CAAC,KAAK,CAAC,sBAmUlF,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -129,7 +129,7 @@ var stub = function () {
129
129
  /**
130
130
  * @ignore
131
131
  */
132
- var initialContext = __assign(__assign({}, initialAuthState), { buildAuthorizeUrl: stub, buildLogoutUrl: stub, getAccessTokenSilently: stub, getAccessTokenWithPopup: stub, getIdTokenClaims: stub, loginWithCustomTokenExchange: stub, customTokenExchange: stub, exchangeToken: stub, loginWithRedirect: stub, loginWithPopup: stub, connectAccountWithRedirect: stub, logout: stub, handleRedirectCallback: stub, getDpopNonce: stub, setDpopNonce: stub, generateDpopProof: stub, createFetcher: stub, getConfiguration: stub, mfa: {
132
+ var initialContext = __assign(__assign({}, initialAuthState), { buildAuthorizeUrl: stub, buildLogoutUrl: stub, getAccessTokenSilently: stub, getAccessTokenWithPopup: stub, getIdTokenClaims: stub, loginWithCustomTokenExchange: stub, customTokenExchange: stub, exchangeToken: stub, loginWithRedirect: stub, loginWithPopup: stub, connectAccountWithRedirect: stub, logout: stub, revokeRefreshToken: stub, handleRedirectCallback: stub, getDpopNonce: stub, setDpopNonce: stub, generateDpopProof: stub, createFetcher: stub, getConfiguration: stub, mfa: {
133
133
  getAuthenticators: stub,
134
134
  enroll: stub,
135
135
  challenge: stub,
@@ -254,7 +254,7 @@ var toAuth0ClientOptions = function (opts) {
254
254
  deprecateRedirectUri(opts);
255
255
  return __assign(__assign({}, opts), { auth0Client: {
256
256
  name: 'auth0-react',
257
- version: '2.20.0',
257
+ version: '2.21.0',
258
258
  } });
259
259
  };
260
260
  /**
@@ -383,6 +383,9 @@ var Auth0Provider = function (opts) {
383
383
  });
384
384
  });
385
385
  }, [client]);
386
+ var revokeRefreshToken = React.useCallback(function (options) {
387
+ return client.revokeRefreshToken(options);
388
+ }, [client]);
386
389
  var getAccessTokenSilently = React.useCallback(
387
390
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
388
391
  function (opts) { return __awaiter(void 0, void 0, void 0, function () {
@@ -580,7 +583,7 @@ var Auth0Provider = function (opts) {
580
583
  }); }, [client]);
581
584
  var passkey = React.useMemo(function () { return ({ signup: passkeySignup, login: passkeyLogin }); }, [passkeySignup, passkeyLogin]);
582
585
  var contextValue = React.useMemo(function () {
583
- return __assign(__assign({}, state), { getAccessTokenSilently: getAccessTokenSilently, getAccessTokenWithPopup: getAccessTokenWithPopup, getIdTokenClaims: getIdTokenClaims, loginWithCustomTokenExchange: loginWithCustomTokenExchange, customTokenExchange: customTokenExchange, exchangeToken: exchangeToken, loginWithRedirect: loginWithRedirect, loginWithPopup: loginWithPopup, connectAccountWithRedirect: connectAccountWithRedirect, logout: logout, handleRedirectCallback: handleRedirectCallback, getDpopNonce: getDpopNonce, setDpopNonce: setDpopNonce, generateDpopProof: generateDpopProof, createFetcher: createFetcher, getConfiguration: getConfiguration, mfa: mfa, passkey: passkey, myAccount: myAccount });
586
+ return __assign(__assign({}, state), { getAccessTokenSilently: getAccessTokenSilently, getAccessTokenWithPopup: getAccessTokenWithPopup, getIdTokenClaims: getIdTokenClaims, loginWithCustomTokenExchange: loginWithCustomTokenExchange, customTokenExchange: customTokenExchange, exchangeToken: exchangeToken, loginWithRedirect: loginWithRedirect, loginWithPopup: loginWithPopup, connectAccountWithRedirect: connectAccountWithRedirect, logout: logout, revokeRefreshToken: revokeRefreshToken, handleRedirectCallback: handleRedirectCallback, getDpopNonce: getDpopNonce, setDpopNonce: setDpopNonce, generateDpopProof: generateDpopProof, createFetcher: createFetcher, getConfiguration: getConfiguration, mfa: mfa, passkey: passkey, myAccount: myAccount });
584
587
  }, [
585
588
  state,
586
589
  getAccessTokenSilently,
@@ -593,6 +596,7 @@ var Auth0Provider = function (opts) {
593
596
  loginWithPopup,
594
597
  connectAccountWithRedirect,
595
598
  logout,
599
+ revokeRefreshToken,
596
600
  handleRedirectCallback,
597
601
  getDpopNonce,
598
602
  setDpopNonce,
@@ -1 +1 @@
1
- {"version":3,"file":"auth0-react.cjs.js","sources":["../src/auth-state.tsx","../src/auth0-context.tsx","../src/errors.tsx","../src/utils.tsx","../src/reducer.tsx","../src/auth0-provider.tsx","../src/use-auth0.tsx","../src/with-auth0.tsx","../src/with-authentication-required.tsx"],"sourcesContent":["import { User } from '@auth0/auth0-spa-js';\n\n/**\n * The auth state which, when combined with the auth methods, make up the return object of the `useAuth0` hook.\n */\nexport interface AuthState<TUser extends User = User> {\n error: Error | undefined;\n isAuthenticated: boolean;\n isLoading: boolean;\n user: TUser | undefined;\n}\n\n/**\n * The initial auth state.\n */\nexport const initialAuthState: AuthState = {\n isAuthenticated: false,\n isLoading: true,\n error: undefined,\n user: undefined,\n};\n","import {\n GetTokenSilentlyOptions,\n GetTokenWithPopupOptions,\n IdToken,\n LogoutOptions as SPALogoutOptions,\n PopupLoginOptions,\n PopupConfigOptions,\n RedirectLoginResult,\n User,\n GetTokenSilentlyVerboseResponse,\n RedirectLoginOptions as SPARedirectLoginOptions,\n type Auth0Client,\n RedirectConnectAccountOptions,\n ConnectAccountRedirectResult,\n CustomTokenExchangeOptions,\n TokenEndpointResponse,\n type MfaApiClient,\n type PasskeyApiClient,\n type MyAccountApiClient\n} from '@auth0/auth0-spa-js';\nimport { createContext } from 'react';\nimport { AuthState, initialAuthState } from './auth-state';\nimport { AppState } from './auth0-provider';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface LogoutOptions extends Omit<SPALogoutOptions, 'onRedirect'> {}\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface RedirectLoginOptions<TAppState = AppState>\n extends Omit<SPARedirectLoginOptions<TAppState>, 'onRedirect'> {}\n\n/**\n * Contains the authenticated state and authentication methods provided by the `useAuth0` hook.\n */\nexport interface Auth0ContextInterface<TUser extends User = User>\n extends AuthState<TUser> {\n /**\n * ```js\n * const token = await getAccessTokenSilently(options);\n * ```\n *\n * If there's a valid token stored, return it. Otherwise, opens an\n * iframe with the `/authorize` URL using the parameters provided\n * as arguments. Random and secure `state` and `nonce` parameters\n * will be auto-generated. If the response is successful, results\n * will be valid according to their expiration times.\n *\n * If refresh tokens are used, the token endpoint is called directly with the\n * 'refresh_token' grant. If no refresh token is available to make this call,\n * the SDK will only fall back to using an iframe to the '/authorize' URL if \n * the `useRefreshTokensFallback` setting has been set to `true`. By default this\n * setting is `false`.\n *\n * This method may use a web worker to perform the token call if the in-memory\n * cache is used.\n *\n * If an `audience` value is given to this function, the SDK always falls\n * back to using an iframe to make the token exchange.\n *\n * Note that in all cases, falling back to an iframe requires access to\n * the `auth0` cookie.\n */\n getAccessTokenSilently: {\n (\n options: GetTokenSilentlyOptions & { detailedResponse: true }\n ): Promise<GetTokenSilentlyVerboseResponse>;\n (options?: GetTokenSilentlyOptions): Promise<string>;\n (options: GetTokenSilentlyOptions): Promise<\n GetTokenSilentlyVerboseResponse | string\n >;\n };\n\n /**\n * ```js\n * const token = await getTokenWithPopup(options, config);\n * ```\n *\n * Get an access token interactively.\n *\n * Opens a popup with the `/authorize` URL using the parameters\n * provided as arguments. Random and secure `state` and `nonce`\n * parameters will be auto-generated. If the response is successful,\n * results will be valid according to their expiration times.\n */\n getAccessTokenWithPopup: (\n options?: GetTokenWithPopupOptions,\n config?: PopupConfigOptions\n ) => Promise<string | undefined>;\n\n /**\n * ```js\n * const claims = await getIdTokenClaims();\n * ```\n *\n * Returns all claims from the id_token if available.\n */\n getIdTokenClaims: () => Promise<IdToken | undefined>;\n\n /**\n * ```js\n * await loginWithCustomTokenExchange(options);\n * ```\n *\n * Exchanges an external subject token for Auth0 tokens and logs the user in.\n * This method implements the Custom Token Exchange grant as specified in RFC 8693.\n *\n * The exchanged tokens are automatically cached, establishing an authenticated session.\n * After calling this method, you can use `getUser()`, `getIdTokenClaims()`, and\n * `getTokenSilently()` to access the user's information and tokens.\n *\n * @param options - The options required to perform the token exchange.\n *\n * @returns A promise that resolves to the token endpoint response,\n * which contains the issued Auth0 tokens (access_token, id_token, etc.).\n *\n * The request includes the following parameters:\n * - `grant_type`: \"urn:ietf:params:oauth:grant-type:token-exchange\"\n * - `subject_token`: The external token to exchange\n * - `subject_token_type`: The type identifier of the external token\n * - `scope`: Merged scopes from the request and SDK defaults\n * - `audience`: Target audience (defaults to SDK configuration)\n * - `organization`: Optional organization ID/name for org-scoped authentication\n *\n * **Example Usage:**\n *\n * ```js\n * const options = {\n * subject_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6Ikp...',\n * subject_token_type: 'urn:acme:legacy-system-token',\n * scope: 'openid profile email',\n * audience: 'https://api.example.com',\n * organization: 'org_12345'\n * };\n *\n * try {\n * const tokenResponse = await loginWithCustomTokenExchange(options);\n * console.log('Access token:', tokenResponse.access_token);\n *\n * // User is now logged in - access user info\n * const user = await getUser();\n * console.log('Logged in user:', user);\n * } catch (error) {\n * console.error('Token exchange failed:', error);\n * }\n * ```\n */\n loginWithCustomTokenExchange: (\n options: CustomTokenExchangeOptions\n ) => Promise<TokenEndpointResponse>;\n\n /**\n * ```js\n * const tokenResponse = await customTokenExchange({\n * subject_token: 'ey...',\n * subject_token_type: 'urn:acme:legacy-system-token',\n * actor_token: 'ey...',\n * actor_token_type: 'https://idp.example.com/token-type/agent',\n * });\n * ```\n *\n * Exchanges an external subject token for Auth0 tokens without affecting the current session.\n *\n * Unlike `loginWithCustomTokenExchange`, this method has no side effects — it does not cache\n * tokens, does not update the authenticated session, and does not affect `isAuthenticated`\n * or `user`. Use this for delegation or impersonation scenarios where you need a downstream\n * API token without changing who the current user is.\n *\n * When `actor_token` is present Auth0 suppresses refresh token issuance; a missing\n * `refresh_token` in the response is expected and will not cause an error.\n *\n * @param options - The options required to perform the token exchange.\n * @returns A promise that resolves to the token endpoint response.\n */\n customTokenExchange: (\n options: CustomTokenExchangeOptions\n ) => Promise<TokenEndpointResponse>;\n\n /**\n * @deprecated Use `loginWithCustomTokenExchange()` instead. This method will be removed in the next major version.\n *\n * ```js\n * const tokenResponse = await exchangeToken({\n * subject_token: 'external_token_value',\n * subject_token_type: 'urn:acme:legacy-system-token',\n * scope: 'openid profile email'\n * });\n * ```\n *\n * Exchanges an external subject token for Auth0 tokens and logs the user in.\n *\n * This method implements the token exchange grant as specified in RFC 8693.\n * It performs a token exchange by sending a request to the `/oauth/token` endpoint\n * with the external token and returns Auth0 tokens (access token, ID token, etc.).\n *\n * **Example:**\n * ```js\n * // Instead of:\n * const tokens = await exchangeToken(options);\n *\n * // Use:\n * const tokens = await loginWithCustomTokenExchange(options);\n * ```\n *\n * @param options - The options required to perform the token exchange\n * @returns A promise that resolves to the token endpoint response containing Auth0 tokens\n */\n exchangeToken: (\n options: CustomTokenExchangeOptions\n ) => Promise<TokenEndpointResponse>;\n\n /**\n * ```js\n * await loginWithRedirect(options);\n * ```\n *\n * Performs a redirect to `/authorize` using the parameters\n * provided as arguments. Random and secure `state` and `nonce`\n * parameters will be auto-generated.\n */\n loginWithRedirect: (\n options?: RedirectLoginOptions<AppState>\n ) => Promise<void>;\n\n /**\n * ```js\n * await loginWithPopup(options, config);\n * ```\n *\n * Opens a popup with the `/authorize` URL using the parameters\n * provided as arguments. Random and secure `state` and `nonce`\n * parameters will be auto-generated. If the response is successful,\n * results will be valid according to their expiration times.\n *\n * IMPORTANT: This method has to be called from an event handler\n * that was started by the user like a button click, for example,\n * otherwise the popup will be blocked in most browsers.\n */\n loginWithPopup: (\n options?: PopupLoginOptions,\n config?: PopupConfigOptions\n ) => Promise<void>;\n\n /**\n * ```js\n * await connectAccountWithRedirect({\n * connection: 'google-oauth2',\n * scopes: ['openid', 'profile', 'email', 'https://www.googleapis.com/auth/drive.readonly'],\n * authorization_params: {\n * // additional authorization params to forward to the authorization server\n * }\n * });\n * ```\n *\n * Redirects to the `/connect` URL using the parameters\n * provided as arguments. This then redirects to the connection's login page\n * where the user can authenticate and authorize the account to be connected.\n *\n * If connecting the account is successful `onRedirectCallback` will be called\n * with the details of the connected account.\n */\n connectAccountWithRedirect: (\n options: RedirectConnectAccountOptions\n ) => Promise<void>;\n\n /**\n * ```js\n * auth0.logout({ logoutParams: { returnTo: window.location.origin } });\n * ```\n *\n * Clears the application session and performs a redirect to `/v2/logout`, using\n * the parameters provided as arguments, to clear the Auth0 session.\n * If the `logoutParams.federated` option is specified, it also clears the Identity Provider session.\n * [Read more about how Logout works at Auth0](https://auth0.com/docs/logout).\n */\n logout: (options?: LogoutOptions) => Promise<void>;\n\n /**\n * After the browser redirects back to the callback page,\n * call `handleRedirectCallback` to handle success and error\n * responses from Auth0. If the response is successful, results\n * will be valid according to their expiration times.\n *\n * @param url The URL to that should be used to retrieve the `state` and `code` values. Defaults to `window.location.href` if not given.\n */\n handleRedirectCallback: (url?: string) => Promise<RedirectLoginResult | ConnectAccountRedirectResult>;\n\n /**\n * Returns the current DPoP nonce used for making requests to Auth0.\n *\n * It can return `undefined` because when starting fresh it will not\n * be populated until after the first response from the server.\n *\n * It requires enabling the {@link Auth0ClientOptions.useDpop} option.\n *\n * @param nonce The nonce value.\n * @param id The identifier of a nonce: if absent, it will get the nonce\n * used for requests to Auth0. Otherwise, it will be used to\n * select a specific non-Auth0 nonce.\n */\n getDpopNonce: Auth0Client['getDpopNonce'];\n\n /**\n * Sets the current DPoP nonce used for making requests to Auth0.\n *\n * It requires enabling the {@link Auth0ClientOptions.useDpop} option.\n *\n * @param nonce The nonce value.\n * @param id The identifier of a nonce: if absent, it will set the nonce\n * used for requests to Auth0. Otherwise, it will be used to\n * select a specific non-Auth0 nonce.\n */\n setDpopNonce: Auth0Client['setDpopNonce'];\n\n /**\n * Returns a string to be used to demonstrate possession of the private\n * key used to cryptographically bind access tokens with DPoP.\n *\n * It requires enabling the {@link Auth0ClientOptions.useDpop} option.\n */\n generateDpopProof: Auth0Client['generateDpopProof'];\n\n /**\n * Returns a new `Fetcher` class that will contain a `fetchWithAuth()` method.\n * This is a drop-in replacement for the Fetch API's `fetch()` method, but will\n * handle certain authentication logic for you, like building the proper auth\n * headers or managing DPoP nonces and retries automatically.\n *\n * Check the `EXAMPLES.md` file for a deeper look into this method.\n */\n createFetcher: Auth0Client['createFetcher'];\n\n /**\n * ```js\n * const config = getConfiguration();\n * // { domain: 'tenant.auth0.com', clientId: 'abc123' }\n * ```\n *\n * Returns a readonly copy of the initialization configuration\n * containing the domain and clientId.\n */\n getConfiguration: Auth0Client['getConfiguration'];\n\n /**\n * ```js\n * const { mfa } = useAuth0();\n * const authenticators = await mfa.getAuthenticators(mfaToken);\n * ```\n *\n * MFA API client for Multi-Factor Authentication operations.\n *\n * Provides access to all MFA-related methods:\n * - `getAuthenticators(mfaToken)` - List enrolled authenticators\n * - `enroll(params)` - Enroll new authenticators (OTP, SMS, Voice, Email, Push)\n * - `challenge(params)` - Initiate MFA challenges\n * - `verify(params)` - Verify MFA challenges and complete authentication\n * - `getEnrollmentFactors(mfaToken)` - Get available enrollment factors\n *\n * @example\n * ```js\n * const { mfa, getAccessTokenSilently } = useAuth0();\n *\n * try {\n * await getAccessTokenSilently();\n * } catch (error) {\n * if (error.error === 'mfa_required') {\n * // Check if enrollment is needed\n * const factors = await mfa.getEnrollmentFactors(error.mfa_token);\n *\n * if (factors.length > 0) {\n * // Enroll in OTP\n * const enrollment = await mfa.enroll({\n * mfaToken: error.mfa_token,\n * factorType: 'otp'\n * });\n * console.log('QR Code:', enrollment.barcodeUri);\n * }\n *\n * // Get authenticators and challenge\n * const authenticators = await mfa.getAuthenticators(error.mfa_token);\n * await mfa.challenge({\n * mfaToken: error.mfa_token,\n * challengeType: 'otp',\n * authenticatorId: authenticators[0].id\n * });\n *\n * // Verify with user's code\n * const tokens = await mfa.verify({\n * mfaToken: error.mfa_token,\n * otp: userCode\n * });\n * }\n * }\n * ```\n */\n mfa: MfaApiClient;\n\n /**\n * ```js\n * const { passkey } = useAuth0();\n * const tokens = await passkey.signup({ email: 'user@example.com' });\n * ```\n *\n * Passkey API client for WebAuthn-based passwordless authentication.\n *\n * - `signup(options)` — register a new user and create a passkey credential\n * - `login(options?)` — authenticate an existing user via passkey assertion\n *\n * Both methods exchange the WebAuthn credential for Auth0 tokens and update\n * `isAuthenticated` / `user` in the same way as `loginWithPopup`.\n */\n passkey: PasskeyApiClient;\n\n /**\n * ```js\n * const { myAccount } = useAuth0();\n * const factors = await myAccount.getFactors();\n * ```\n *\n * MyAccount API client for self-service account management operations.\n *\n * Provides access to methods for managing the authenticated user's authentication\n * methods and factors:\n * - `getFactors()` - List available authentication factors\n * - `getAuthenticationMethods(type?)` - List enrolled authentication methods, optionally filtered by type\n * - `getAuthenticationMethod(id)` - Get a specific authentication method by ID\n * - `updateAuthenticationMethod(id, data)` - Update an authentication method (e.g. rename)\n * - `deleteAuthenticationMethod(id)` - Remove an enrolled authentication method\n * - `enrollmentChallenge(options)` - Initiate a two-step enrollment challenge\n * - `enrollmentVerify(options)` - Complete a two-step enrollment by verifying the challenge\n *\n * @example\n * ```js\n * const { myAccount } = useAuth0();\n *\n * // List all enrolled authentication methods\n * const methods = await myAccount.getAuthenticationMethods();\n *\n * // Enroll a new passkey\n * const challenge = await myAccount.enrollmentChallenge({ type: 'passkey' });\n * const credential = await navigator.credentials.create({ publicKey: challenge.authn_params_public_key });\n * await myAccount.enrollmentVerify({ type: 'passkey', auth_session: challenge.auth_session, location: challenge.location, authn_response: credential });\n *\n * // Remove an authentication method\n * await myAccount.deleteAuthenticationMethod('method-id');\n * ```\n */\n myAccount: MyAccountApiClient;\n}\n\n/**\n * @ignore\n */\nconst stub = (): never => {\n throw new Error('You forgot to wrap your component in <Auth0Provider>.');\n};\n\n/**\n * @ignore\n */\nexport const initialContext = {\n ...initialAuthState,\n buildAuthorizeUrl: stub,\n buildLogoutUrl: stub,\n getAccessTokenSilently: stub,\n getAccessTokenWithPopup: stub,\n getIdTokenClaims: stub,\n loginWithCustomTokenExchange: stub,\n customTokenExchange: stub,\n exchangeToken: stub,\n loginWithRedirect: stub,\n loginWithPopup: stub,\n connectAccountWithRedirect: stub,\n logout: stub,\n handleRedirectCallback: stub,\n getDpopNonce: stub,\n setDpopNonce: stub,\n generateDpopProof: stub,\n createFetcher: stub,\n getConfiguration: stub,\n mfa: {\n getAuthenticators: stub,\n enroll: stub,\n challenge: stub,\n verify: stub,\n getEnrollmentFactors: stub,\n } as unknown as MfaApiClient,\n passkey: {\n signup: stub,\n login: stub,\n } as unknown as PasskeyApiClient,\n myAccount: {\n getFactors: stub,\n getAuthenticationMethods: stub,\n getAuthenticationMethod: stub,\n updateAuthenticationMethod: stub,\n deleteAuthenticationMethod: stub,\n enrollmentChallenge: stub,\n enrollmentVerify: stub,\n } as unknown as MyAccountApiClient,\n};\n\n/**\n * The Auth0 Context\n */\nconst Auth0Context = createContext<Auth0ContextInterface>(initialContext);\n\nexport default Auth0Context;\n","/**\n * An OAuth2 error will come from the authorization server and will have at least an `error` property which will\n * be the error code. And possibly an `error_description` property\n *\n * See: https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.3.1.2.6\n */\nexport class OAuthError extends Error {\n constructor(public error: string, public error_description?: string) {\n super(error_description ?? error);\n\n // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n Object.setPrototypeOf(this, OAuthError.prototype);\n }\n}\n","import { OAuthError } from './errors';\n\nconst CODE_RE = /[?&](?:connect_)?code=[^&]+/;\nconst STATE_RE = /[?&]state=[^&]+/;\nconst ERROR_RE = /[?&]error=[^&]+/;\n\ninterface WithError {\n error: string;\n}\n\ninterface WithErrorAndDescription {\n error: string;\n error_description: string;\n}\n\nexport const hasAuthParams = (searchParams = window.location.search): boolean =>\n (CODE_RE.test(searchParams) || ERROR_RE.test(searchParams)) &&\n STATE_RE.test(searchParams);\n\nconst normalizeErrorFn =\n (fallbackMessage: string) =>\n (error: unknown): Error => {\n if (error instanceof Error) {\n return error;\n }\n // try to check errors of the following form: {error: string; error_description?: string}\n if (\n error !== null &&\n typeof error === 'object' &&\n 'error' in error &&\n typeof (error as WithError).error === 'string'\n ) {\n if (\n 'error_description' in error &&\n typeof (error as WithErrorAndDescription).error_description === 'string'\n ) {\n const e = error as WithErrorAndDescription;\n return new OAuthError(e.error, e.error_description);\n }\n const e = error as WithError;\n return new OAuthError(e.error);\n }\n return new Error(fallbackMessage);\n };\n\nexport const loginError = normalizeErrorFn('Login failed');\n\nexport const tokenError = normalizeErrorFn('Get access token failed');\n\n/**\n * @ignore\n * Helper function to map the v1 `redirectUri` option to the v2 `authorizationParams.redirect_uri`\n * and log a warning.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const deprecateRedirectUri = (options?: any) => {\n if (options?.redirectUri) {\n console.warn(\n 'Using `redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `redirectUri` will be no longer supported in a future version'\n );\n options.authorizationParams = options.authorizationParams ?? {};\n options.authorizationParams.redirect_uri = options.redirectUri;\n delete options.redirectUri;\n }\n\n if (options?.authorizationParams?.redirectUri) {\n console.warn(\n 'Using `authorizationParams.redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `authorizationParams.redirectUri` will be removed in a future version'\n );\n options.authorizationParams.redirect_uri =\n options.authorizationParams.redirectUri;\n delete options.authorizationParams.redirectUri;\n }\n};\n","import { User } from '@auth0/auth0-spa-js';\nimport { AuthState } from './auth-state';\n\ntype Action =\n | { type: 'LOGIN_POPUP_STARTED' }\n | {\n type:\n | 'INITIALISED'\n | 'LOGIN_POPUP_COMPLETE'\n | 'GET_ACCESS_TOKEN_COMPLETE'\n | 'HANDLE_REDIRECT_COMPLETE';\n user: User | undefined;\n }\n | { type: 'LOGOUT' }\n | { type: 'ERROR'; error: Error };\n\n/**\n * Handles how that state changes in the `useAuth0` hook.\n */\nexport const reducer = <TUser extends User = User>(state: AuthState<TUser>, action: Action): AuthState<TUser> => {\n switch (action.type) {\n case 'LOGIN_POPUP_STARTED':\n return {\n ...state,\n isLoading: true,\n };\n case 'LOGIN_POPUP_COMPLETE':\n case 'INITIALISED':\n return {\n ...state,\n isAuthenticated: !!action.user,\n user: action.user as TUser | undefined,\n isLoading: false,\n error: undefined,\n };\n case 'HANDLE_REDIRECT_COMPLETE':\n case 'GET_ACCESS_TOKEN_COMPLETE':\n if (state.user === action.user) {\n return state;\n }\n return {\n ...state,\n isAuthenticated: !!action.user,\n user: action.user as TUser | undefined,\n };\n case 'LOGOUT':\n return {\n ...state,\n isAuthenticated: false,\n user: undefined,\n };\n case 'ERROR':\n return {\n ...state,\n isLoading: false,\n error: action.error,\n };\n }\n};\n","import React, {\n useCallback,\n useEffect,\n useMemo,\n useReducer,\n useRef,\n useState,\n} from 'react';\nimport {\n Auth0Client,\n Auth0ClientOptions,\n PopupLoginOptions,\n PopupConfigOptions,\n GetTokenWithPopupOptions,\n RedirectLoginResult,\n GetTokenSilentlyOptions,\n User,\n RedirectConnectAccountOptions,\n ConnectAccountRedirectResult,\n ResponseType,\n CustomTokenExchangeOptions,\n TokenEndpointResponse,\n type PasskeyApiClient,\n type PasskeySignupOptions,\n type PasskeyLoginOptions\n} from '@auth0/auth0-spa-js';\nimport Auth0Context, {\n Auth0ContextInterface,\n LogoutOptions,\n RedirectLoginOptions,\n} from './auth0-context';\nimport {\n hasAuthParams,\n loginError,\n tokenError,\n deprecateRedirectUri,\n} from './utils';\nimport { reducer } from './reducer';\nimport { initialAuthState, type AuthState } from './auth-state';\n\n/**\n * The account that has been connected during the connect flow.\n */\nexport type ConnectedAccount = Omit<ConnectAccountRedirectResult, 'appState' | 'response_type'>;\n\n/**\n * The state of the application before the user was redirected to the login page\n * and any account that the user may have connected to.\n */\nexport type AppState = {\n returnTo?: string;\n connectedAccount?: ConnectedAccount;\n response_type?: ResponseType;\n [key: string]: any; // eslint-disable-line @typescript-eslint/no-explicit-any\n};\n\ntype Auth0ProviderBaseOptions<TUser extends User = User> = {\n /**\n * The child nodes your Provider has wrapped\n */\n children?: React.ReactNode;\n /**\n * By default this removes the code and state parameters from the url when you are redirected from the authorize page.\n * It uses `window.history` but you might want to overwrite this if you are using a custom router, like `react-router-dom`\n * See the EXAMPLES.md for more info.\n */\n onRedirectCallback?: (appState?: AppState, user?: TUser) => void;\n /**\n * By default, if the page url has code/state params, the SDK will treat them as Auth0's and attempt to exchange the\n * code for a token. In some cases the code might be for something else (another OAuth SDK perhaps). In these\n * instances you can instruct the client to ignore them eg\n *\n * ```jsx\n * <Auth0Provider\n * clientId={clientId}\n * domain={domain}\n * skipRedirectCallback={window.location.pathname === '/stripe-oauth-callback'}\n * >\n * ```\n */\n skipRedirectCallback?: boolean;\n /**\n * Context to be used when creating the Auth0Provider, defaults to the internally created context.\n *\n * This allows multiple Auth0Providers to be nested within the same application, the context value can then be\n * passed to useAuth0, withAuth0, or withAuthenticationRequired to use that specific Auth0Provider to access\n * auth state and methods specifically tied to the provider that the context belongs to.\n *\n * When using multiple Auth0Providers in a single application you should do the following to ensure sessions are not\n * overwritten:\n *\n * * Configure a different redirect_uri for each Auth0Provider, and set skipRedirectCallback for each provider to ignore\n * the others redirect_uri\n * * If using localstorage for both Auth0Providers, ensure that the audience and scope are different for so that the key\n * used to store data is different\n *\n * For a sample on using multiple Auth0Providers review the [React Account Linking Sample](https://github.com/auth0-samples/auth0-link-accounts-sample/tree/react-variant)\n */\n context?: React.Context<Auth0ContextInterface<TUser>>;\n};\n\n/**\n * Options for `Auth0Provider` when configuring Auth0 via `domain` and `clientId`.\n * Use this type when building wrapper components around `Auth0Provider`.\n */\nexport type Auth0ProviderWithConfigOptions<TUser extends User = User> =\n Auth0ProviderBaseOptions<TUser> & Auth0ClientOptions & { client?: never };\n\n/**\n * Options for `Auth0Provider` when supplying a pre-configured `Auth0Client` instance.\n */\nexport type Auth0ProviderWithClientOptions<TUser extends User = User> =\n Auth0ProviderBaseOptions<TUser> & { client: Auth0Client };\n\n/**\n * The main configuration to instantiate the `Auth0Provider`.\n *\n * Either provide `domain` and `clientId` (`Auth0ProviderWithConfigOptions`)\n * or a pre-configured `client` instance (`Auth0ProviderWithClientOptions`).\n */\nexport type Auth0ProviderOptions<TUser extends User = User> =\n | Auth0ProviderWithConfigOptions<TUser>\n | Auth0ProviderWithClientOptions<TUser>;\n\n/**\n * Replaced by the package version at build time.\n * @ignore\n */\ndeclare const __VERSION__: string;\n\n/**\n * @ignore\n */\nconst toAuth0ClientOptions = (\n opts: Auth0ClientOptions\n): Auth0ClientOptions => {\n deprecateRedirectUri(opts);\n\n return {\n ...opts,\n auth0Client: {\n name: 'auth0-react',\n version: __VERSION__,\n },\n };\n};\n\n/**\n * @ignore\n */\nconst defaultOnRedirectCallback = (appState?: AppState): void => {\n window.history.replaceState(\n {},\n document.title,\n appState!.returnTo ?? window.location.pathname\n );\n};\n\n/**\n * ```jsx\n * <Auth0Provider\n * domain={domain}\n * clientId={clientId}\n * authorizationParams={{ redirect_uri: window.location.origin }}>\n * <MyApp />\n * </Auth0Provider>\n * ```\n *\n * Provides the Auth0Context to its child components.\n */\nconst Auth0Provider = <TUser extends User = User>(opts: Auth0ProviderOptions<TUser>) => {\n const {\n children,\n skipRedirectCallback,\n onRedirectCallback = defaultOnRedirectCallback,\n context = Auth0Context,\n client: providedClient,\n ...clientOpts\n } = opts as Auth0ProviderBaseOptions<TUser> & Auth0ClientOptions & { client?: Auth0Client };\n if (providedClient && (clientOpts.domain || clientOpts.clientId)) {\n console.warn(\n 'Auth0Provider: the `client` prop takes precedence over `domain`/`clientId` and other ' +\n 'configuration options. Remove `domain`, `clientId`, and any other Auth0Client configuration ' +\n 'props when using the `client` prop.'\n );\n }\n const [client] = useState(\n () => providedClient ?? new Auth0Client(toAuth0ClientOptions(clientOpts))\n );\n const [state, dispatch] = useReducer(reducer<TUser>, initialAuthState as AuthState<TUser>);\n const didInitialise = useRef(false);\n\n const handleError = useCallback((error: Error) => {\n dispatch({ type: 'ERROR', error });\n return error;\n }, []);\n\n useEffect(() => {\n if (didInitialise.current) {\n return;\n }\n didInitialise.current = true;\n (async (): Promise<void> => {\n try {\n let user: TUser | undefined;\n if (hasAuthParams() && !skipRedirectCallback) {\n const { appState = {}, response_type, ...result } = await client.handleRedirectCallback();\n user = await client.getUser();\n appState.response_type = response_type;\n if (response_type === ResponseType.ConnectCode) {\n appState.connectedAccount = result as ConnectedAccount;\n }\n onRedirectCallback(appState, user);\n } else {\n await client.checkSession();\n user = await client.getUser();\n }\n dispatch({ type: 'INITIALISED', user });\n } catch (error) {\n handleError(loginError(error));\n }\n })();\n }, [client, onRedirectCallback, skipRedirectCallback, handleError]);\n\n const loginWithRedirect = useCallback(\n (opts?: RedirectLoginOptions): Promise<void> => {\n deprecateRedirectUri(opts);\n\n return client.loginWithRedirect(opts);\n },\n [client]\n );\n\n const loginWithPopup = useCallback(\n async (\n options?: PopupLoginOptions,\n config?: PopupConfigOptions\n ): Promise<void> => {\n dispatch({ type: 'LOGIN_POPUP_STARTED' });\n try {\n await client.loginWithPopup(options, config);\n } catch (error) {\n handleError(loginError(error));\n return;\n }\n const user = await client.getUser();\n dispatch({ type: 'LOGIN_POPUP_COMPLETE', user });\n },\n [client, handleError]\n );\n\n const logout = useCallback(\n async (opts: LogoutOptions = {}): Promise<void> => {\n await client.logout(opts);\n if (opts.openUrl || opts.openUrl === false) {\n dispatch({ type: 'LOGOUT' });\n }\n },\n [client]\n );\n\n const getAccessTokenSilently = useCallback(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n async (opts?: GetTokenSilentlyOptions): Promise<any> => {\n let token;\n try {\n token = await client.getTokenSilently(opts);\n } catch (error) {\n throw tokenError(error);\n } finally {\n dispatch({\n type: 'GET_ACCESS_TOKEN_COMPLETE',\n user: await client.getUser(),\n });\n }\n return token;\n },\n [client]\n );\n\n const getAccessTokenWithPopup = useCallback(\n async (\n opts?: GetTokenWithPopupOptions,\n config?: PopupConfigOptions\n ): Promise<string | undefined> => {\n let token;\n try {\n token = await client.getTokenWithPopup(opts, config);\n } catch (error) {\n throw tokenError(error);\n } finally {\n dispatch({\n type: 'GET_ACCESS_TOKEN_COMPLETE',\n user: await client.getUser(),\n });\n }\n return token;\n },\n [client]\n );\n\n const connectAccountWithRedirect = useCallback(\n (options: RedirectConnectAccountOptions) =>\n client.connectAccountWithRedirect(options),\n [client]\n );\n\n const getIdTokenClaims = useCallback(\n () => client.getIdTokenClaims(),\n [client]\n );\n\n const loginWithCustomTokenExchange = useCallback(\n async (\n options: CustomTokenExchangeOptions\n ): Promise<TokenEndpointResponse> => {\n let tokenResponse;\n try {\n tokenResponse = await client.loginWithCustomTokenExchange(options);\n } catch (error) {\n throw tokenError(error);\n } finally {\n // We dispatch the standard GET_ACCESS_TOKEN_COMPLETE action here to maintain\n // backward compatibility and consistency with the getAccessTokenSilently flow.\n // This ensures the SDK's internal state lifecycle (loading/user updates) remains\n // identical regardless of whether the token was retrieved via silent auth or CTE.\n dispatch({\n type: 'GET_ACCESS_TOKEN_COMPLETE',\n user: await client.getUser(),\n });\n }\n return tokenResponse;\n },\n [client]\n );\n\n const customTokenExchange = useCallback(\n (options: CustomTokenExchangeOptions): Promise<TokenEndpointResponse> =>\n client.customTokenExchange(options),\n [client]\n );\n\n const exchangeToken = useCallback(\n async (\n options: CustomTokenExchangeOptions\n ): Promise<TokenEndpointResponse> => {\n return loginWithCustomTokenExchange(options);\n },\n [loginWithCustomTokenExchange]\n );\n\n const handleRedirectCallback = useCallback(\n async (\n url?: string\n ): Promise<RedirectLoginResult | ConnectAccountRedirectResult> => {\n try {\n return await client.handleRedirectCallback(url);\n } catch (error) {\n throw tokenError(error);\n } finally {\n dispatch({\n type: 'HANDLE_REDIRECT_COMPLETE',\n user: await client.getUser(),\n });\n }\n },\n [client]\n );\n\n const getDpopNonce = useCallback<Auth0Client['getDpopNonce']>(\n (id) => client.getDpopNonce(id),\n [client]\n );\n\n const setDpopNonce = useCallback<Auth0Client['setDpopNonce']>(\n (nonce, id) => client.setDpopNonce(nonce, id),\n [client]\n );\n\n const generateDpopProof = useCallback<Auth0Client['generateDpopProof']>(\n (params) => client.generateDpopProof(params),\n [client]\n );\n\n const createFetcher = useCallback<Auth0Client['createFetcher']>(\n (config) => client.createFetcher(config),\n [client]\n );\n\n const getConfiguration = useCallback<Auth0Client['getConfiguration']>(\n () => client.getConfiguration(),\n [client]\n );\n\n const mfa = useMemo(() => client.mfa, [client]);\n const myAccount = useMemo(() => client.myAccount, [client]);\n\n const passkeySignup = useCallback(\n async (options: PasskeySignupOptions): Promise<TokenEndpointResponse> => {\n let tokenResponse;\n try {\n tokenResponse = await client.passkey.signup(options);\n } catch (error) {\n throw tokenError(error);\n } finally {\n dispatch({\n type: 'GET_ACCESS_TOKEN_COMPLETE',\n user: await client.getUser(),\n });\n }\n return tokenResponse;\n },\n [client]\n );\n\n const passkeyLogin = useCallback(\n async (options?: PasskeyLoginOptions): Promise<TokenEndpointResponse> => {\n let tokenResponse;\n try {\n tokenResponse = await client.passkey.login(options);\n } catch (error) {\n throw tokenError(error);\n } finally {\n dispatch({\n type: 'GET_ACCESS_TOKEN_COMPLETE',\n user: await client.getUser(),\n });\n }\n return tokenResponse;\n },\n [client]\n );\n\n const passkey = useMemo(\n () => ({ signup: passkeySignup, login: passkeyLogin }) as unknown as PasskeyApiClient,\n [passkeySignup, passkeyLogin]\n );\n\n const contextValue = useMemo<Auth0ContextInterface<TUser>>(() => {\n return {\n ...state,\n getAccessTokenSilently,\n getAccessTokenWithPopup,\n getIdTokenClaims,\n loginWithCustomTokenExchange,\n customTokenExchange,\n exchangeToken,\n loginWithRedirect,\n loginWithPopup,\n connectAccountWithRedirect,\n logout,\n handleRedirectCallback,\n getDpopNonce,\n setDpopNonce,\n generateDpopProof,\n createFetcher,\n getConfiguration,\n mfa,\n passkey,\n myAccount,\n };\n }, [\n state,\n getAccessTokenSilently,\n getAccessTokenWithPopup,\n getIdTokenClaims,\n loginWithCustomTokenExchange,\n customTokenExchange,\n exchangeToken,\n loginWithRedirect,\n loginWithPopup,\n connectAccountWithRedirect,\n logout,\n handleRedirectCallback,\n getDpopNonce,\n setDpopNonce,\n generateDpopProof,\n createFetcher,\n getConfiguration,\n mfa,\n passkey,\n myAccount,\n ]);\n\n return <context.Provider value={contextValue}>{children}</context.Provider>;\n};\n\nexport default Auth0Provider;\n","import { useContext } from 'react';\nimport { User } from '@auth0/auth0-spa-js';\nimport Auth0Context, { Auth0ContextInterface } from './auth0-context';\n\n/**\n * ```js\n * const {\n * // Auth state:\n * error,\n * isAuthenticated,\n * isLoading,\n * user,\n * // Auth methods:\n * getAccessTokenSilently,\n * getAccessTokenWithPopup,\n * getIdTokenClaims,\n * loginWithCustomTokenExchange,\n * exchangeToken, // deprecated - use loginWithCustomTokenExchange\n * loginWithRedirect,\n * loginWithPopup,\n * logout,\n * } = useAuth0<TUser>();\n * ```\n *\n * Use the `useAuth0` hook in your components to access the auth state and methods.\n *\n * TUser is an optional type param to provide a type to the `user` field.\n */\nconst useAuth0 = <TUser extends User = User>(\n context = Auth0Context\n): Auth0ContextInterface<TUser> =>\n useContext(context) as Auth0ContextInterface<TUser>;\n\nexport default useAuth0;\n","import React, { ComponentType } from 'react';\nimport Auth0Context, { Auth0ContextInterface } from './auth0-context';\n\n/**\n * Components wrapped in `withAuth0` will have an additional `auth0` prop\n */\nexport interface WithAuth0Props {\n auth0: Auth0ContextInterface;\n}\n\n/**\n * ```jsx\n * class MyComponent extends Component {\n * render() {\n * // Access the auth context from the `auth0` prop\n * const { user } = this.props.auth0;\n * return <div>Hello {user.name}!</div>\n * }\n * }\n * // Wrap your class component in withAuth0\n * export default withAuth0(MyComponent);\n * ```\n *\n * Wrap your class components in this Higher Order Component to give them access to the Auth0Context.\n *\n * Providing a context as the second argument allows you to configure the Auth0Provider the Auth0Context\n * should come from f you have multiple within your application.\n */\nconst withAuth0 = <P extends WithAuth0Props>(\n Component: ComponentType<P>,\n context = Auth0Context\n): ComponentType<Omit<P, keyof WithAuth0Props>> => {\n return function WithAuth(props): React.JSX.Element {\n return (\n <context.Consumer>\n {(auth: Auth0ContextInterface): React.JSX.Element => (\n <Component {...(props as P)} auth0={auth} />\n )}\n </context.Consumer>\n );\n };\n};\n\nexport default withAuth0;\n","import React, { ComponentType, useEffect, FC } from 'react';\nimport useAuth0 from './use-auth0';\nimport Auth0Context, {\n Auth0ContextInterface,\n RedirectLoginOptions,\n} from './auth0-context';\n\n/**\n * @ignore\n */\nconst defaultOnRedirecting = (): React.JSX.Element => <></>;\n\n/**\n* @ignore\n*/\nconst defaultOnBeforeAuthentication = async (): Promise<void> => {/* noop */ };\n\n/**\n * @ignore\n */\nconst defaultReturnTo = (): string =>\n `${window.location.pathname}${window.location.search}`;\n\n/**\n * Options for the withAuthenticationRequired Higher Order Component\n */\nexport interface WithAuthenticationRequiredOptions {\n /**\n * ```js\n * withAuthenticationRequired(Profile, {\n * returnTo: '/profile'\n * })\n * ```\n *\n * or\n *\n * ```js\n * withAuthenticationRequired(Profile, {\n * returnTo: () => window.location.hash.substr(1)\n * })\n * ```\n *\n * Add a path for the `onRedirectCallback` handler to return the user to after login.\n */\n returnTo?: string | (() => string);\n /**\n * ```js\n * withAuthenticationRequired(Profile, {\n * onRedirecting: () => <div>Redirecting you to the login...</div>\n * })\n * ```\n *\n * Render a message to show that the user is being redirected to the login.\n */\n onRedirecting?: () => React.JSX.Element;\n /**\n * ```js\n * withAuthenticationRequired(Profile, {\n * onBeforeAuthentication: () => { analyticsLibrary.track('login_triggered'); }\n * })\n * ```\n *\n * Allows executing logic before the user is redirected to the login page.\n */\n onBeforeAuthentication?: () => Promise<void>;\n /**\n * ```js\n * withAuthenticationRequired(Profile, {\n * loginOptions: {\n * appState: {\n * customProp: 'foo'\n * }\n * }\n * })\n * ```\n *\n * Pass additional login options, like extra `appState` to the login page.\n * This will be merged with the `returnTo` option used by the `onRedirectCallback` handler.\n */\n loginOptions?: RedirectLoginOptions;\n /**\n * The context to be used when calling useAuth0, this should only be provided if you are using multiple Auth0Providers\n * within your application and you wish to tie a specific component to a Auth0Provider other than the Auth0Provider\n * associated with the default Auth0Context.\n */\n context?: React.Context<Auth0ContextInterface>;\n}\n\n/**\n * ```js\n * const MyProtectedComponent = withAuthenticationRequired(MyComponent);\n * ```\n *\n * When you wrap your components in this Higher Order Component and an anonymous user visits your component\n * they will be redirected to the login page; after login they will be returned to the page they were redirected from.\n */\nconst withAuthenticationRequired = <P extends object>(\n Component: ComponentType<P>,\n options: WithAuthenticationRequiredOptions = {}\n): FC<P> => {\n return function WithAuthenticationRequired(props: P): React.JSX.Element {\n const {\n returnTo = defaultReturnTo,\n onRedirecting = defaultOnRedirecting,\n onBeforeAuthentication = defaultOnBeforeAuthentication,\n loginOptions,\n context = Auth0Context,\n } = options;\n\n const { isAuthenticated, isLoading, loginWithRedirect } =\n useAuth0(context);\n\n useEffect(() => {\n if (isLoading || isAuthenticated) {\n return;\n }\n const opts = {\n ...loginOptions,\n appState: {\n ...loginOptions?.appState,\n returnTo: typeof returnTo === 'function' ? returnTo() : returnTo,\n },\n };\n void (async (): Promise<void> => {\n await onBeforeAuthentication();\n await loginWithRedirect(opts);\n })();\n }, [\n isLoading,\n isAuthenticated,\n loginWithRedirect,\n onBeforeAuthentication,\n loginOptions,\n returnTo,\n ]);\n\n return isAuthenticated ? <Component {...props} /> : onRedirecting();\n };\n};\n\nexport default withAuthenticationRequired;\n"],"names":["createContext","useState","Auth0Client","useReducer","useRef","useCallback","useEffect","ResponseType","useMemo","useContext"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA;;AAEG;AACI,IAAM,gBAAgB,GAAc;AACzC,IAAA,eAAe,EAAE,KAAK;AACtB,IAAA,SAAS,EAAE,IAAI;AACf,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,IAAI,EAAE,SAAS;CAChB;;AC4aD;;AAEG;AACH,IAAM,IAAI,GAAG,YAAA;AACX,IAAA,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CA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src/errors.tsx","../src/utils.tsx","../src/reducer.tsx","../src/auth0-provider.tsx","../src/use-auth0.tsx","../src/with-auth0.tsx","../src/with-authentication-required.tsx"],"sourcesContent":["import { User } from '@auth0/auth0-spa-js';\n\n/**\n * The auth state which, when combined with the auth methods, make up the return object of the `useAuth0` hook.\n */\nexport interface AuthState<TUser extends User = User> {\n error: Error | undefined;\n isAuthenticated: boolean;\n isLoading: boolean;\n user: TUser | undefined;\n}\n\n/**\n * The initial auth state.\n */\nexport const initialAuthState: AuthState = {\n isAuthenticated: false,\n isLoading: true,\n error: undefined,\n user: undefined,\n};\n","import {\n GetTokenSilentlyOptions,\n GetTokenWithPopupOptions,\n IdToken,\n LogoutOptions as SPALogoutOptions,\n PopupLoginOptions,\n PopupConfigOptions,\n RedirectLoginResult,\n User,\n GetTokenSilentlyVerboseResponse,\n RedirectLoginOptions as SPARedirectLoginOptions,\n type Auth0Client,\n RedirectConnectAccountOptions,\n ConnectAccountRedirectResult,\n CustomTokenExchangeOptions,\n TokenEndpointResponse,\n type RevokeRefreshTokenOptions,\n type MfaApiClient,\n type PasskeyApiClient,\n type MyAccountApiClient\n} from '@auth0/auth0-spa-js';\nimport { createContext } from 'react';\nimport { AuthState, initialAuthState } from './auth-state';\nimport { AppState } from './auth0-provider';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface LogoutOptions extends Omit<SPALogoutOptions, 'onRedirect'> {}\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface RedirectLoginOptions<TAppState = AppState>\n extends Omit<SPARedirectLoginOptions<TAppState>, 'onRedirect'> {}\n\n/**\n * Contains the authenticated state and authentication methods provided by the `useAuth0` hook.\n */\nexport interface Auth0ContextInterface<TUser extends User = User>\n extends AuthState<TUser> {\n /**\n * ```js\n * const token = await getAccessTokenSilently(options);\n * ```\n *\n * If there's a valid token stored, return it. Otherwise, opens an\n * iframe with the `/authorize` URL using the parameters provided\n * as arguments. Random and secure `state` and `nonce` parameters\n * will be auto-generated. If the response is successful, results\n * will be valid according to their expiration times.\n *\n * If refresh tokens are used, the token endpoint is called directly with the\n * 'refresh_token' grant. If no refresh token is available to make this call,\n * the SDK will only fall back to using an iframe to the '/authorize' URL if \n * the `useRefreshTokensFallback` setting has been set to `true`. By default this\n * setting is `false`.\n *\n * This method may use a web worker to perform the token call if the in-memory\n * cache is used.\n *\n * If an `audience` value is given to this function, the SDK always falls\n * back to using an iframe to make the token exchange.\n *\n * Note that in all cases, falling back to an iframe requires access to\n * the `auth0` cookie.\n */\n getAccessTokenSilently: {\n (\n options: GetTokenSilentlyOptions & { detailedResponse: true }\n ): Promise<GetTokenSilentlyVerboseResponse>;\n (options?: GetTokenSilentlyOptions): Promise<string>;\n (options: GetTokenSilentlyOptions): Promise<\n GetTokenSilentlyVerboseResponse | string\n >;\n };\n\n /**\n * ```js\n * const token = await getTokenWithPopup(options, config);\n * ```\n *\n * Get an access token interactively.\n *\n * Opens a popup with the `/authorize` URL using the parameters\n * provided as arguments. Random and secure `state` and `nonce`\n * parameters will be auto-generated. If the response is successful,\n * results will be valid according to their expiration times.\n */\n getAccessTokenWithPopup: (\n options?: GetTokenWithPopupOptions,\n config?: PopupConfigOptions\n ) => Promise<string | undefined>;\n\n /**\n * ```js\n * const claims = await getIdTokenClaims();\n * ```\n *\n * Returns all claims from the id_token if available.\n */\n getIdTokenClaims: () => Promise<IdToken | undefined>;\n\n /**\n * ```js\n * await loginWithCustomTokenExchange(options);\n * ```\n *\n * Exchanges an external subject token for Auth0 tokens and logs the user in.\n * This method implements the Custom Token Exchange grant as specified in RFC 8693.\n *\n * The exchanged tokens are automatically cached, establishing an authenticated session.\n * After calling this method, you can use `getUser()`, `getIdTokenClaims()`, and\n * `getTokenSilently()` to access the user's information and tokens.\n *\n * @param options - The options required to perform the token exchange.\n *\n * @returns A promise that resolves to the token endpoint response,\n * which contains the issued Auth0 tokens (access_token, id_token, etc.).\n *\n * The request includes the following parameters:\n * - `grant_type`: \"urn:ietf:params:oauth:grant-type:token-exchange\"\n * - `subject_token`: The external token to exchange\n * - `subject_token_type`: The type identifier of the external token\n * - `scope`: Merged scopes from the request and SDK defaults\n * - `audience`: Target audience (defaults to SDK configuration)\n * - `organization`: Optional organization ID/name for org-scoped authentication\n *\n * **Example Usage:**\n *\n * ```js\n * const options = {\n * subject_token: 'eyJhbGciOiJIUzI1NiIsInR5cCI6Ikp...',\n * subject_token_type: 'urn:acme:legacy-system-token',\n * scope: 'openid profile email',\n * audience: 'https://api.example.com',\n * organization: 'org_12345'\n * };\n *\n * try {\n * const tokenResponse = await loginWithCustomTokenExchange(options);\n * console.log('Access token:', tokenResponse.access_token);\n *\n * // User is now logged in - access user info\n * const user = await getUser();\n * console.log('Logged in user:', user);\n * } catch (error) {\n * console.error('Token exchange failed:', error);\n * }\n * ```\n */\n loginWithCustomTokenExchange: (\n options: CustomTokenExchangeOptions\n ) => Promise<TokenEndpointResponse>;\n\n /**\n * ```js\n * const tokenResponse = await customTokenExchange({\n * subject_token: 'ey...',\n * subject_token_type: 'urn:acme:legacy-system-token',\n * actor_token: 'ey...',\n * actor_token_type: 'https://idp.example.com/token-type/agent',\n * });\n * ```\n *\n * Exchanges an external subject token for Auth0 tokens without affecting the current session.\n *\n * Unlike `loginWithCustomTokenExchange`, this method has no side effects — it does not cache\n * tokens, does not update the authenticated session, and does not affect `isAuthenticated`\n * or `user`. Use this for delegation or impersonation scenarios where you need a downstream\n * API token without changing who the current user is.\n *\n * When `actor_token` is present Auth0 suppresses refresh token issuance; a missing\n * `refresh_token` in the response is expected and will not cause an error.\n *\n * @param options - The options required to perform the token exchange.\n * @returns A promise that resolves to the token endpoint response.\n */\n customTokenExchange: (\n options: CustomTokenExchangeOptions\n ) => Promise<TokenEndpointResponse>;\n\n /**\n * @deprecated Use `loginWithCustomTokenExchange()` instead. This method will be removed in the next major version.\n *\n * ```js\n * const tokenResponse = await exchangeToken({\n * subject_token: 'external_token_value',\n * subject_token_type: 'urn:acme:legacy-system-token',\n * scope: 'openid profile email'\n * });\n * ```\n *\n * Exchanges an external subject token for Auth0 tokens and logs the user in.\n *\n * This method implements the token exchange grant as specified in RFC 8693.\n * It performs a token exchange by sending a request to the `/oauth/token` endpoint\n * with the external token and returns Auth0 tokens (access token, ID token, etc.).\n *\n * **Example:**\n * ```js\n * // Instead of:\n * const tokens = await exchangeToken(options);\n *\n * // Use:\n * const tokens = await loginWithCustomTokenExchange(options);\n * ```\n *\n * @param options - The options required to perform the token exchange\n * @returns A promise that resolves to the token endpoint response containing Auth0 tokens\n */\n exchangeToken: (\n options: CustomTokenExchangeOptions\n ) => Promise<TokenEndpointResponse>;\n\n /**\n * ```js\n * await loginWithRedirect(options);\n * ```\n *\n * Performs a redirect to `/authorize` using the parameters\n * provided as arguments. Random and secure `state` and `nonce`\n * parameters will be auto-generated.\n */\n loginWithRedirect: (\n options?: RedirectLoginOptions<AppState>\n ) => Promise<void>;\n\n /**\n * ```js\n * await loginWithPopup(options, config);\n * ```\n *\n * Opens a popup with the `/authorize` URL using the parameters\n * provided as arguments. Random and secure `state` and `nonce`\n * parameters will be auto-generated. If the response is successful,\n * results will be valid according to their expiration times.\n *\n * IMPORTANT: This method has to be called from an event handler\n * that was started by the user like a button click, for example,\n * otherwise the popup will be blocked in most browsers.\n */\n loginWithPopup: (\n options?: PopupLoginOptions,\n config?: PopupConfigOptions\n ) => Promise<void>;\n\n /**\n * ```js\n * await connectAccountWithRedirect({\n * connection: 'google-oauth2',\n * scopes: ['openid', 'profile', 'email', 'https://www.googleapis.com/auth/drive.readonly'],\n * authorization_params: {\n * // additional authorization params to forward to the authorization server\n * }\n * });\n * ```\n *\n * Redirects to the `/connect` URL using the parameters\n * provided as arguments. This then redirects to the connection's login page\n * where the user can authenticate and authorize the account to be connected.\n *\n * If connecting the account is successful `onRedirectCallback` will be called\n * with the details of the connected account.\n */\n connectAccountWithRedirect: (\n options: RedirectConnectAccountOptions\n ) => Promise<void>;\n\n /**\n * ```js\n * auth0.logout({ logoutParams: { returnTo: window.location.origin } });\n * ```\n *\n * Clears the application session and performs a redirect to `/v2/logout`, using\n * the parameters provided as arguments, to clear the Auth0 session.\n * If the `logoutParams.federated` option is specified, it also clears the Identity Provider session.\n * [Read more about how Logout works at Auth0](https://auth0.com/docs/logout).\n */\n logout: (options?: LogoutOptions) => Promise<void>;\n\n /**\n * ```js\n * await revokeRefreshToken();\n * // or for a specific audience:\n * await revokeRefreshToken({ audience: 'https://api.example.com' });\n * ```\n *\n * Revokes the refresh token for the current session by calling the\n * `/oauth/revoke` endpoint. Once revoked, the token can no longer be\n * used to obtain new access tokens.\n *\n * If `useRefreshTokens` is not enabled this is a no-op.\n * When multiple audiences share the same refresh token, revoking for\n * one audience invalidates it for all of them.\n */\n revokeRefreshToken: (options?: RevokeRefreshTokenOptions) => Promise<void>;\n\n /**\n * After the browser redirects back to the callback page,\n * call `handleRedirectCallback` to handle success and error\n * responses from Auth0. If the response is successful, results\n * will be valid according to their expiration times.\n *\n * @param url The URL to that should be used to retrieve the `state` and `code` values. Defaults to `window.location.href` if not given.\n */\n handleRedirectCallback: (url?: string) => Promise<RedirectLoginResult | ConnectAccountRedirectResult>;\n\n /**\n * Returns the current DPoP nonce used for making requests to Auth0.\n *\n * It can return `undefined` because when starting fresh it will not\n * be populated until after the first response from the server.\n *\n * It requires enabling the {@link Auth0ClientOptions.useDpop} option.\n *\n * @param nonce The nonce value.\n * @param id The identifier of a nonce: if absent, it will get the nonce\n * used for requests to Auth0. Otherwise, it will be used to\n * select a specific non-Auth0 nonce.\n */\n getDpopNonce: Auth0Client['getDpopNonce'];\n\n /**\n * Sets the current DPoP nonce used for making requests to Auth0.\n *\n * It requires enabling the {@link Auth0ClientOptions.useDpop} option.\n *\n * @param nonce The nonce value.\n * @param id The identifier of a nonce: if absent, it will set the nonce\n * used for requests to Auth0. Otherwise, it will be used to\n * select a specific non-Auth0 nonce.\n */\n setDpopNonce: Auth0Client['setDpopNonce'];\n\n /**\n * Returns a string to be used to demonstrate possession of the private\n * key used to cryptographically bind access tokens with DPoP.\n *\n * It requires enabling the {@link Auth0ClientOptions.useDpop} option.\n */\n generateDpopProof: Auth0Client['generateDpopProof'];\n\n /**\n * Returns a new `Fetcher` class that will contain a `fetchWithAuth()` method.\n * This is a drop-in replacement for the Fetch API's `fetch()` method, but will\n * handle certain authentication logic for you, like building the proper auth\n * headers or managing DPoP nonces and retries automatically.\n *\n * Check the `EXAMPLES.md` file for a deeper look into this method.\n */\n createFetcher: Auth0Client['createFetcher'];\n\n /**\n * ```js\n * const config = getConfiguration();\n * // { domain: 'tenant.auth0.com', clientId: 'abc123' }\n * ```\n *\n * Returns a readonly copy of the initialization configuration\n * containing the domain and clientId.\n */\n getConfiguration: Auth0Client['getConfiguration'];\n\n /**\n * ```js\n * const { mfa } = useAuth0();\n * const authenticators = await mfa.getAuthenticators(mfaToken);\n * ```\n *\n * MFA API client for Multi-Factor Authentication operations.\n *\n * Provides access to all MFA-related methods:\n * - `getAuthenticators(mfaToken)` - List enrolled authenticators\n * - `enroll(params)` - Enroll new authenticators (OTP, SMS, Voice, Email, Push)\n * - `challenge(params)` - Initiate MFA challenges\n * - `verify(params)` - Verify MFA challenges and complete authentication\n * - `getEnrollmentFactors(mfaToken)` - Get available enrollment factors\n *\n * @example\n * ```js\n * const { mfa, getAccessTokenSilently } = useAuth0();\n *\n * try {\n * await getAccessTokenSilently();\n * } catch (error) {\n * if (error.error === 'mfa_required') {\n * // Check if enrollment is needed\n * const factors = await mfa.getEnrollmentFactors(error.mfa_token);\n *\n * if (factors.length > 0) {\n * // Enroll in OTP\n * const enrollment = await mfa.enroll({\n * mfaToken: error.mfa_token,\n * factorType: 'otp'\n * });\n * console.log('QR Code:', enrollment.barcodeUri);\n * }\n *\n * // Get authenticators and challenge\n * const authenticators = await mfa.getAuthenticators(error.mfa_token);\n * await mfa.challenge({\n * mfaToken: error.mfa_token,\n * challengeType: 'otp',\n * authenticatorId: authenticators[0].id\n * });\n *\n * // Verify with user's code\n * const tokens = await mfa.verify({\n * mfaToken: error.mfa_token,\n * otp: userCode\n * });\n * }\n * }\n * ```\n */\n mfa: MfaApiClient;\n\n /**\n * ```js\n * const { passkey } = useAuth0();\n * const tokens = await passkey.signup({ email: 'user@example.com' });\n * ```\n *\n * Passkey API client for WebAuthn-based passwordless authentication.\n *\n * - `signup(options)` — register a new user and create a passkey credential\n * - `login(options?)` — authenticate an existing user via passkey assertion\n *\n * Both methods exchange the WebAuthn credential for Auth0 tokens and update\n * `isAuthenticated` / `user` in the same way as `loginWithPopup`.\n */\n passkey: PasskeyApiClient;\n\n /**\n * ```js\n * const { myAccount } = useAuth0();\n * const factors = await myAccount.getFactors();\n * ```\n *\n * MyAccount API client for self-service account management operations.\n *\n * Provides access to methods for managing the authenticated user's authentication\n * methods and factors:\n * - `getFactors()` - List available authentication factors\n * - `getAuthenticationMethods(type?)` - List enrolled authentication methods, optionally filtered by type\n * - `getAuthenticationMethod(id)` - Get a specific authentication method by ID\n * - `updateAuthenticationMethod(id, data)` - Update an authentication method (e.g. rename)\n * - `deleteAuthenticationMethod(id)` - Remove an enrolled authentication method\n * - `enrollmentChallenge(options)` - Initiate a two-step enrollment challenge\n * - `enrollmentVerify(options)` - Complete a two-step enrollment by verifying the challenge\n *\n * @example\n * ```js\n * const { myAccount } = useAuth0();\n *\n * // List all enrolled authentication methods\n * const methods = await myAccount.getAuthenticationMethods();\n *\n * // Enroll a new passkey\n * const challenge = await myAccount.enrollmentChallenge({ type: 'passkey' });\n * const credential = await navigator.credentials.create({ publicKey: challenge.authn_params_public_key });\n * await myAccount.enrollmentVerify({ type: 'passkey', auth_session: challenge.auth_session, location: challenge.location, authn_response: credential });\n *\n * // Remove an authentication method\n * await myAccount.deleteAuthenticationMethod('method-id');\n * ```\n */\n myAccount: MyAccountApiClient;\n}\n\n/**\n * @ignore\n */\nconst stub = (): never => {\n throw new Error('You forgot to wrap your component in <Auth0Provider>.');\n};\n\n/**\n * @ignore\n */\nexport const initialContext = {\n ...initialAuthState,\n buildAuthorizeUrl: stub,\n buildLogoutUrl: stub,\n getAccessTokenSilently: stub,\n getAccessTokenWithPopup: stub,\n getIdTokenClaims: stub,\n loginWithCustomTokenExchange: stub,\n customTokenExchange: stub,\n exchangeToken: stub,\n loginWithRedirect: stub,\n loginWithPopup: stub,\n connectAccountWithRedirect: stub,\n logout: stub,\n revokeRefreshToken: stub,\n handleRedirectCallback: stub,\n getDpopNonce: stub,\n setDpopNonce: stub,\n generateDpopProof: stub,\n createFetcher: stub,\n getConfiguration: stub,\n mfa: {\n getAuthenticators: stub,\n enroll: stub,\n challenge: stub,\n verify: stub,\n getEnrollmentFactors: stub,\n } as unknown as MfaApiClient,\n passkey: {\n signup: stub,\n login: stub,\n } as unknown as PasskeyApiClient,\n myAccount: {\n getFactors: stub,\n getAuthenticationMethods: stub,\n getAuthenticationMethod: stub,\n updateAuthenticationMethod: stub,\n deleteAuthenticationMethod: stub,\n enrollmentChallenge: stub,\n enrollmentVerify: stub,\n } as unknown as MyAccountApiClient,\n};\n\n/**\n * The Auth0 Context\n */\nconst Auth0Context = createContext<Auth0ContextInterface>(initialContext);\n\nexport default Auth0Context;\n","/**\n * An OAuth2 error will come from the authorization server and will have at least an `error` property which will\n * be the error code. And possibly an `error_description` property\n *\n * See: https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.3.1.2.6\n */\nexport class OAuthError extends Error {\n constructor(public error: string, public error_description?: string) {\n super(error_description ?? error);\n\n // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\n Object.setPrototypeOf(this, OAuthError.prototype);\n }\n}\n","import { OAuthError } from './errors';\n\nconst CODE_RE = /[?&](?:connect_)?code=[^&]+/;\nconst STATE_RE = /[?&]state=[^&]+/;\nconst ERROR_RE = /[?&]error=[^&]+/;\n\ninterface WithError {\n error: string;\n}\n\ninterface WithErrorAndDescription {\n error: string;\n error_description: string;\n}\n\nexport const hasAuthParams = (searchParams = window.location.search): boolean =>\n (CODE_RE.test(searchParams) || ERROR_RE.test(searchParams)) &&\n STATE_RE.test(searchParams);\n\nconst normalizeErrorFn =\n (fallbackMessage: string) =>\n (error: unknown): Error => {\n if (error instanceof Error) {\n return error;\n }\n // try to check errors of the following form: {error: string; error_description?: string}\n if (\n error !== null &&\n typeof error === 'object' &&\n 'error' in error &&\n typeof (error as WithError).error === 'string'\n ) {\n if (\n 'error_description' in error &&\n typeof (error as WithErrorAndDescription).error_description === 'string'\n ) {\n const e = error as WithErrorAndDescription;\n return new OAuthError(e.error, e.error_description);\n }\n const e = error as WithError;\n return new OAuthError(e.error);\n }\n return new Error(fallbackMessage);\n };\n\nexport const loginError = normalizeErrorFn('Login failed');\n\nexport const tokenError = normalizeErrorFn('Get access token failed');\n\n/**\n * @ignore\n * Helper function to map the v1 `redirectUri` option to the v2 `authorizationParams.redirect_uri`\n * and log a warning.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const deprecateRedirectUri = (options?: any) => {\n if (options?.redirectUri) {\n console.warn(\n 'Using `redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `redirectUri` will be no longer supported in a future version'\n );\n options.authorizationParams = options.authorizationParams ?? {};\n options.authorizationParams.redirect_uri = options.redirectUri;\n delete options.redirectUri;\n }\n\n if (options?.authorizationParams?.redirectUri) {\n console.warn(\n 'Using `authorizationParams.redirectUri` has been deprecated, please use `authorizationParams.redirect_uri` instead as `authorizationParams.redirectUri` will be removed in a future version'\n );\n options.authorizationParams.redirect_uri =\n options.authorizationParams.redirectUri;\n delete options.authorizationParams.redirectUri;\n }\n};\n","import { User } from '@auth0/auth0-spa-js';\nimport { AuthState } from './auth-state';\n\ntype Action =\n | { type: 'LOGIN_POPUP_STARTED' }\n | {\n type:\n | 'INITIALISED'\n | 'LOGIN_POPUP_COMPLETE'\n | 'GET_ACCESS_TOKEN_COMPLETE'\n | 'HANDLE_REDIRECT_COMPLETE';\n user: User | undefined;\n }\n | { type: 'LOGOUT' }\n | { type: 'ERROR'; error: Error };\n\n/**\n * Handles how that state changes in the `useAuth0` hook.\n */\nexport const reducer = <TUser extends User = User>(state: AuthState<TUser>, action: Action): AuthState<TUser> => {\n switch (action.type) {\n case 'LOGIN_POPUP_STARTED':\n return {\n ...state,\n isLoading: true,\n };\n case 'LOGIN_POPUP_COMPLETE':\n case 'INITIALISED':\n return {\n ...state,\n isAuthenticated: !!action.user,\n user: action.user as TUser | undefined,\n isLoading: false,\n error: undefined,\n };\n case 'HANDLE_REDIRECT_COMPLETE':\n case 'GET_ACCESS_TOKEN_COMPLETE':\n if (state.user === action.user) {\n return state;\n }\n return {\n ...state,\n isAuthenticated: !!action.user,\n user: action.user as TUser | undefined,\n };\n case 'LOGOUT':\n return {\n ...state,\n isAuthenticated: false,\n user: undefined,\n };\n case 'ERROR':\n return {\n ...state,\n isLoading: false,\n error: action.error,\n };\n }\n};\n","import React, {\n useCallback,\n useEffect,\n useMemo,\n useReducer,\n useRef,\n useState,\n} from 'react';\nimport {\n Auth0Client,\n Auth0ClientOptions,\n PopupLoginOptions,\n PopupConfigOptions,\n GetTokenWithPopupOptions,\n RedirectLoginResult,\n GetTokenSilentlyOptions,\n User,\n RedirectConnectAccountOptions,\n ConnectAccountRedirectResult,\n ResponseType,\n CustomTokenExchangeOptions,\n TokenEndpointResponse,\n type RevokeRefreshTokenOptions,\n type PasskeyApiClient,\n type PasskeySignupOptions,\n type PasskeyLoginOptions\n} from '@auth0/auth0-spa-js';\nimport Auth0Context, {\n Auth0ContextInterface,\n LogoutOptions,\n RedirectLoginOptions,\n} from './auth0-context';\nimport {\n hasAuthParams,\n loginError,\n tokenError,\n deprecateRedirectUri,\n} from './utils';\nimport { reducer } from './reducer';\nimport { initialAuthState, type AuthState } from './auth-state';\n\n/**\n * The account that has been connected during the connect flow.\n */\nexport type ConnectedAccount = Omit<ConnectAccountRedirectResult, 'appState' | 'response_type'>;\n\n/**\n * The state of the application before the user was redirected to the login page\n * and any account that the user may have connected to.\n */\nexport type AppState = {\n returnTo?: string;\n connectedAccount?: ConnectedAccount;\n response_type?: ResponseType;\n [key: string]: any; // eslint-disable-line @typescript-eslint/no-explicit-any\n};\n\ntype Auth0ProviderBaseOptions<TUser extends User = User> = {\n /**\n * The child nodes your Provider has wrapped\n */\n children?: React.ReactNode;\n /**\n * By default this removes the code and state parameters from the url when you are redirected from the authorize page.\n * It uses `window.history` but you might want to overwrite this if you are using a custom router, like `react-router-dom`\n * See the EXAMPLES.md for more info.\n */\n onRedirectCallback?: (appState?: AppState, user?: TUser) => void;\n /**\n * By default, if the page url has code/state params, the SDK will treat them as Auth0's and attempt to exchange the\n * code for a token. In some cases the code might be for something else (another OAuth SDK perhaps). In these\n * instances you can instruct the client to ignore them eg\n *\n * ```jsx\n * <Auth0Provider\n * clientId={clientId}\n * domain={domain}\n * skipRedirectCallback={window.location.pathname === '/stripe-oauth-callback'}\n * >\n * ```\n */\n skipRedirectCallback?: boolean;\n /**\n * Context to be used when creating the Auth0Provider, defaults to the internally created context.\n *\n * This allows multiple Auth0Providers to be nested within the same application, the context value can then be\n * passed to useAuth0, withAuth0, or withAuthenticationRequired to use that specific Auth0Provider to access\n * auth state and methods specifically tied to the provider that the context belongs to.\n *\n * When using multiple Auth0Providers in a single application you should do the following to ensure sessions are not\n * overwritten:\n *\n * * Configure a different redirect_uri for each Auth0Provider, and set skipRedirectCallback for each provider to ignore\n * the others redirect_uri\n * * If using localstorage for both Auth0Providers, ensure that the audience and scope are different for so that the key\n * used to store data is different\n *\n * For a sample on using multiple Auth0Providers review the [React Account Linking Sample](https://github.com/auth0-samples/auth0-link-accounts-sample/tree/react-variant)\n */\n context?: React.Context<Auth0ContextInterface<TUser>>;\n};\n\n/**\n * Options for `Auth0Provider` when configuring Auth0 via `domain` and `clientId`.\n * Use this type when building wrapper components around `Auth0Provider`.\n */\nexport type Auth0ProviderWithConfigOptions<TUser extends User = User> =\n Auth0ProviderBaseOptions<TUser> & Auth0ClientOptions & { client?: never };\n\n/**\n * Options for `Auth0Provider` when supplying a pre-configured `Auth0Client` instance.\n */\nexport type Auth0ProviderWithClientOptions<TUser extends User = User> =\n Auth0ProviderBaseOptions<TUser> & { client: Auth0Client };\n\n/**\n * The main configuration to instantiate the `Auth0Provider`.\n *\n * Either provide `domain` and `clientId` (`Auth0ProviderWithConfigOptions`)\n * or a pre-configured `client` instance (`Auth0ProviderWithClientOptions`).\n */\nexport type Auth0ProviderOptions<TUser extends User = User> =\n | Auth0ProviderWithConfigOptions<TUser>\n | Auth0ProviderWithClientOptions<TUser>;\n\n/**\n * Replaced by the package version at build time.\n * @ignore\n */\ndeclare const __VERSION__: string;\n\n/**\n * @ignore\n */\nconst toAuth0ClientOptions = (\n opts: Auth0ClientOptions\n): Auth0ClientOptions => {\n deprecateRedirectUri(opts);\n\n return {\n ...opts,\n auth0Client: {\n name: 'auth0-react',\n version: __VERSION__,\n },\n };\n};\n\n/**\n * @ignore\n */\nconst defaultOnRedirectCallback = (appState?: AppState): void => {\n window.history.replaceState(\n {},\n document.title,\n appState!.returnTo ?? window.location.pathname\n );\n};\n\n/**\n * ```jsx\n * <Auth0Provider\n * domain={domain}\n * clientId={clientId}\n * authorizationParams={{ redirect_uri: window.location.origin }}>\n * <MyApp />\n * </Auth0Provider>\n * ```\n *\n * Provides the Auth0Context to its child components.\n */\nconst Auth0Provider = <TUser extends User = User>(opts: Auth0ProviderOptions<TUser>) => {\n const {\n children,\n skipRedirectCallback,\n onRedirectCallback = defaultOnRedirectCallback,\n context = Auth0Context,\n client: providedClient,\n ...clientOpts\n } = opts as Auth0ProviderBaseOptions<TUser> & Auth0ClientOptions & { client?: Auth0Client };\n if (providedClient && (clientOpts.domain || clientOpts.clientId)) {\n console.warn(\n 'Auth0Provider: the `client` prop takes precedence over `domain`/`clientId` and other ' +\n 'configuration options. Remove `domain`, `clientId`, and any other Auth0Client configuration ' +\n 'props when using the `client` prop.'\n );\n }\n const [client] = useState(\n () => providedClient ?? new Auth0Client(toAuth0ClientOptions(clientOpts))\n );\n const [state, dispatch] = useReducer(reducer<TUser>, initialAuthState as AuthState<TUser>);\n const didInitialise = useRef(false);\n\n const handleError = useCallback((error: Error) => {\n dispatch({ type: 'ERROR', error });\n return error;\n }, []);\n\n useEffect(() => {\n if (didInitialise.current) {\n return;\n }\n didInitialise.current = true;\n (async (): Promise<void> => {\n try {\n let user: TUser | undefined;\n if (hasAuthParams() && !skipRedirectCallback) {\n const { appState = {}, response_type, ...result } = await client.handleRedirectCallback();\n user = await client.getUser();\n appState.response_type = response_type;\n if (response_type === ResponseType.ConnectCode) {\n appState.connectedAccount = result as ConnectedAccount;\n }\n onRedirectCallback(appState, user);\n } else {\n await client.checkSession();\n user = await client.getUser();\n }\n dispatch({ type: 'INITIALISED', user });\n } catch (error) {\n handleError(loginError(error));\n }\n })();\n }, [client, onRedirectCallback, skipRedirectCallback, handleError]);\n\n const loginWithRedirect = useCallback(\n (opts?: RedirectLoginOptions): Promise<void> => {\n deprecateRedirectUri(opts);\n\n return client.loginWithRedirect(opts);\n },\n [client]\n );\n\n const loginWithPopup = useCallback(\n async (\n options?: PopupLoginOptions,\n config?: PopupConfigOptions\n ): Promise<void> => {\n dispatch({ type: 'LOGIN_POPUP_STARTED' });\n try {\n await client.loginWithPopup(options, config);\n } catch (error) {\n handleError(loginError(error));\n return;\n }\n const user = await client.getUser();\n dispatch({ type: 'LOGIN_POPUP_COMPLETE', user });\n },\n [client, handleError]\n );\n\n const logout = useCallback(\n async (opts: LogoutOptions = {}): Promise<void> => {\n await client.logout(opts);\n if (opts.openUrl || opts.openUrl === false) {\n dispatch({ type: 'LOGOUT' });\n }\n },\n [client]\n );\n\n const revokeRefreshToken = useCallback(\n (options?: RevokeRefreshTokenOptions): Promise<void> =>\n client.revokeRefreshToken(options),\n [client]\n );\n\n const getAccessTokenSilently = useCallback(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n async (opts?: GetTokenSilentlyOptions): Promise<any> => {\n let token;\n try {\n token = await client.getTokenSilently(opts);\n } catch (error) {\n throw tokenError(error);\n } finally {\n dispatch({\n type: 'GET_ACCESS_TOKEN_COMPLETE',\n user: await client.getUser(),\n });\n }\n return token;\n },\n [client]\n );\n\n const getAccessTokenWithPopup = useCallback(\n async (\n opts?: GetTokenWithPopupOptions,\n config?: PopupConfigOptions\n ): Promise<string | undefined> => {\n let token;\n try {\n token = await client.getTokenWithPopup(opts, config);\n } catch (error) {\n throw tokenError(error);\n } finally {\n dispatch({\n type: 'GET_ACCESS_TOKEN_COMPLETE',\n user: await client.getUser(),\n });\n }\n return token;\n },\n [client]\n );\n\n const connectAccountWithRedirect = useCallback(\n (options: RedirectConnectAccountOptions) =>\n client.connectAccountWithRedirect(options),\n [client]\n );\n\n const getIdTokenClaims = useCallback(\n () => client.getIdTokenClaims(),\n [client]\n );\n\n const loginWithCustomTokenExchange = useCallback(\n async (\n options: CustomTokenExchangeOptions\n ): Promise<TokenEndpointResponse> => {\n let tokenResponse;\n try {\n tokenResponse = await client.loginWithCustomTokenExchange(options);\n } catch (error) {\n throw tokenError(error);\n } finally {\n // We dispatch the standard GET_ACCESS_TOKEN_COMPLETE action here to maintain\n // backward compatibility and consistency with the getAccessTokenSilently flow.\n // This ensures the SDK's internal state lifecycle (loading/user updates) remains\n // identical regardless of whether the token was retrieved via silent auth or CTE.\n dispatch({\n type: 'GET_ACCESS_TOKEN_COMPLETE',\n user: await client.getUser(),\n });\n }\n return tokenResponse;\n },\n [client]\n );\n\n const customTokenExchange = useCallback(\n (options: CustomTokenExchangeOptions): Promise<TokenEndpointResponse> =>\n client.customTokenExchange(options),\n [client]\n );\n\n const exchangeToken = useCallback(\n async (\n options: CustomTokenExchangeOptions\n ): Promise<TokenEndpointResponse> => {\n return loginWithCustomTokenExchange(options);\n },\n [loginWithCustomTokenExchange]\n );\n\n const handleRedirectCallback = useCallback(\n async (\n url?: string\n ): Promise<RedirectLoginResult | ConnectAccountRedirectResult> => {\n try {\n return await client.handleRedirectCallback(url);\n } catch (error) {\n throw tokenError(error);\n } finally {\n dispatch({\n type: 'HANDLE_REDIRECT_COMPLETE',\n user: await client.getUser(),\n });\n }\n },\n [client]\n );\n\n const getDpopNonce = useCallback<Auth0Client['getDpopNonce']>(\n (id) => client.getDpopNonce(id),\n [client]\n );\n\n const setDpopNonce = useCallback<Auth0Client['setDpopNonce']>(\n (nonce, id) => client.setDpopNonce(nonce, id),\n [client]\n );\n\n const generateDpopProof = useCallback<Auth0Client['generateDpopProof']>(\n (params) => client.generateDpopProof(params),\n [client]\n );\n\n const createFetcher = useCallback<Auth0Client['createFetcher']>(\n (config) => client.createFetcher(config),\n [client]\n );\n\n const getConfiguration = useCallback<Auth0Client['getConfiguration']>(\n () => client.getConfiguration(),\n [client]\n );\n\n const mfa = useMemo(() => client.mfa, [client]);\n const myAccount = useMemo(() => client.myAccount, [client]);\n\n const passkeySignup = useCallback(\n async (options: PasskeySignupOptions): Promise<TokenEndpointResponse> => {\n let tokenResponse;\n try {\n tokenResponse = await client.passkey.signup(options);\n } catch (error) {\n throw tokenError(error);\n } finally {\n dispatch({\n type: 'GET_ACCESS_TOKEN_COMPLETE',\n user: await client.getUser(),\n });\n }\n return tokenResponse;\n },\n [client]\n );\n\n const passkeyLogin = useCallback(\n async (options?: PasskeyLoginOptions): Promise<TokenEndpointResponse> => {\n let tokenResponse;\n try {\n tokenResponse = await client.passkey.login(options);\n } catch (error) {\n throw tokenError(error);\n } finally {\n dispatch({\n type: 'GET_ACCESS_TOKEN_COMPLETE',\n user: await client.getUser(),\n });\n }\n return tokenResponse;\n },\n [client]\n );\n\n const passkey = useMemo(\n () => ({ signup: passkeySignup, login: passkeyLogin }) as unknown as PasskeyApiClient,\n [passkeySignup, passkeyLogin]\n );\n\n const contextValue = useMemo<Auth0ContextInterface<TUser>>(() => {\n return {\n ...state,\n getAccessTokenSilently,\n getAccessTokenWithPopup,\n getIdTokenClaims,\n loginWithCustomTokenExchange,\n customTokenExchange,\n exchangeToken,\n loginWithRedirect,\n loginWithPopup,\n connectAccountWithRedirect,\n logout,\n revokeRefreshToken,\n handleRedirectCallback,\n getDpopNonce,\n setDpopNonce,\n generateDpopProof,\n createFetcher,\n getConfiguration,\n mfa,\n passkey,\n myAccount,\n };\n }, [\n state,\n getAccessTokenSilently,\n getAccessTokenWithPopup,\n getIdTokenClaims,\n loginWithCustomTokenExchange,\n customTokenExchange,\n exchangeToken,\n loginWithRedirect,\n loginWithPopup,\n connectAccountWithRedirect,\n logout,\n revokeRefreshToken,\n handleRedirectCallback,\n getDpopNonce,\n setDpopNonce,\n generateDpopProof,\n createFetcher,\n getConfiguration,\n mfa,\n passkey,\n myAccount,\n ]);\n\n return <context.Provider value={contextValue}>{children}</context.Provider>;\n};\n\nexport default Auth0Provider;\n","import { useContext } from 'react';\nimport { User } from '@auth0/auth0-spa-js';\nimport Auth0Context, { Auth0ContextInterface } from './auth0-context';\n\n/**\n * ```js\n * const {\n * // Auth state:\n * error,\n * isAuthenticated,\n * isLoading,\n * user,\n * // Auth methods:\n * getAccessTokenSilently,\n * getAccessTokenWithPopup,\n * getIdTokenClaims,\n * loginWithCustomTokenExchange,\n * exchangeToken, // deprecated - use loginWithCustomTokenExchange\n * loginWithRedirect,\n * loginWithPopup,\n * logout,\n * } = useAuth0<TUser>();\n * ```\n *\n * Use the `useAuth0` hook in your components to access the auth state and methods.\n *\n * TUser is an optional type param to provide a type to the `user` field.\n */\nconst useAuth0 = <TUser extends User = User>(\n context = Auth0Context\n): Auth0ContextInterface<TUser> =>\n useContext(context) as Auth0ContextInterface<TUser>;\n\nexport default useAuth0;\n","import React, { ComponentType } from 'react';\nimport Auth0Context, { Auth0ContextInterface } from './auth0-context';\n\n/**\n * Components wrapped in `withAuth0` will have an additional `auth0` prop\n */\nexport interface WithAuth0Props {\n auth0: Auth0ContextInterface;\n}\n\n/**\n * ```jsx\n * class MyComponent extends Component {\n * render() {\n * // Access the auth context from the `auth0` prop\n * const { user } = this.props.auth0;\n * return <div>Hello {user.name}!</div>\n * }\n * }\n * // Wrap your class component in withAuth0\n * export default withAuth0(MyComponent);\n * ```\n *\n * Wrap your class components in this Higher Order Component to give them access to the Auth0Context.\n *\n * Providing a context as the second argument allows you to configure the Auth0Provider the Auth0Context\n * should come from f you have multiple within your application.\n */\nconst withAuth0 = <P extends WithAuth0Props>(\n Component: ComponentType<P>,\n context = Auth0Context\n): ComponentType<Omit<P, keyof WithAuth0Props>> => {\n return function WithAuth(props): React.JSX.Element {\n return (\n <context.Consumer>\n {(auth: Auth0ContextInterface): React.JSX.Element => (\n <Component {...(props as P)} auth0={auth} />\n )}\n </context.Consumer>\n );\n };\n};\n\nexport default withAuth0;\n","import React, { ComponentType, useEffect, FC } from 'react';\nimport useAuth0 from './use-auth0';\nimport Auth0Context, {\n Auth0ContextInterface,\n RedirectLoginOptions,\n} from './auth0-context';\n\n/**\n * @ignore\n */\nconst defaultOnRedirecting = (): React.JSX.Element => <></>;\n\n/**\n* @ignore\n*/\nconst defaultOnBeforeAuthentication = async (): Promise<void> => {/* noop */ };\n\n/**\n * @ignore\n */\nconst defaultReturnTo = (): string =>\n `${window.location.pathname}${window.location.search}`;\n\n/**\n * Options for the withAuthenticationRequired Higher Order Component\n */\nexport interface WithAuthenticationRequiredOptions {\n /**\n * ```js\n * withAuthenticationRequired(Profile, {\n * returnTo: '/profile'\n * })\n * ```\n *\n * or\n *\n * ```js\n * withAuthenticationRequired(Profile, {\n * returnTo: () => window.location.hash.substr(1)\n * })\n * ```\n *\n * Add a path for the `onRedirectCallback` handler to return the user to after login.\n */\n returnTo?: string | (() => string);\n /**\n * ```js\n * withAuthenticationRequired(Profile, {\n * onRedirecting: () => <div>Redirecting you to the login...</div>\n * })\n * ```\n *\n * Render a message to show that the user is being redirected to the login.\n */\n onRedirecting?: () => React.JSX.Element;\n /**\n * ```js\n * withAuthenticationRequired(Profile, {\n * onBeforeAuthentication: () => { analyticsLibrary.track('login_triggered'); }\n * })\n * ```\n *\n * Allows executing logic before the user is redirected to the login page.\n */\n onBeforeAuthentication?: () => Promise<void>;\n /**\n * ```js\n * withAuthenticationRequired(Profile, {\n * loginOptions: {\n * appState: {\n * customProp: 'foo'\n * }\n * }\n * })\n * ```\n *\n * Pass additional login options, like extra `appState` to the login page.\n * This will be merged with the `returnTo` option used by the `onRedirectCallback` handler.\n */\n loginOptions?: RedirectLoginOptions;\n /**\n * The context to be used when calling useAuth0, this should only be provided if you are using multiple Auth0Providers\n * within your application and you wish to tie a specific component to a Auth0Provider other than the Auth0Provider\n * associated with the default Auth0Context.\n */\n context?: React.Context<Auth0ContextInterface>;\n}\n\n/**\n * ```js\n * const MyProtectedComponent = withAuthenticationRequired(MyComponent);\n * ```\n *\n * When you wrap your components in this Higher Order Component and an anonymous user visits your component\n * they will be redirected to the login page; after login they will be returned to the page they were redirected from.\n */\nconst withAuthenticationRequired = <P extends object>(\n Component: ComponentType<P>,\n options: WithAuthenticationRequiredOptions = {}\n): FC<P> => {\n return function WithAuthenticationRequired(props: P): React.JSX.Element {\n const {\n returnTo = defaultReturnTo,\n onRedirecting = defaultOnRedirecting,\n onBeforeAuthentication = defaultOnBeforeAuthentication,\n loginOptions,\n context = Auth0Context,\n } = options;\n\n const { isAuthenticated, isLoading, loginWithRedirect } =\n useAuth0(context);\n\n useEffect(() => {\n if (isLoading || isAuthenticated) {\n return;\n }\n const opts = {\n ...loginOptions,\n appState: {\n ...loginOptions?.appState,\n returnTo: typeof returnTo === 'function' ? returnTo() : returnTo,\n },\n };\n void (async (): Promise<void> => {\n await onBeforeAuthentication();\n await loginWithRedirect(opts);\n })();\n }, [\n isLoading,\n isAuthenticated,\n loginWithRedirect,\n onBeforeAuthentication,\n loginOptions,\n returnTo,\n ]);\n\n return isAuthenticated ? <Component {...props} /> : onRedirecting();\n };\n};\n\nexport default withAuthenticationRequired;\n"],"names":["createContext","useState","Auth0Client","useReducer","useRef","useCallback","useEffect","ResponseType","useMemo","useContext"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AA7B,4BAAA,EAAA,CAAA,IAAA,EAA6B,CAAC;;;;AAC/B,aAAA,CAAA,CAAA,EAAA,GAAG,CAAC;AACP,SAAC,EAAE;YACD,SAAS;YACT,eAAe;YACf,iBAAiB;YACjB,sBAAsB;YACtB,YAAY;YACZ,QAAQ;AACT,SAAA,CAAC,CAAC;AAEH,QAAA,OAAO,eAAe,GAAG,oBAAC,SAAS,EAAA,QAAA,CAAA,EAAA,EAAK,KAAK,CAAA,CAAI,GAAG,aAAa,EAAE,CAAC;AACtE,KAAC,CAAC;AACJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -128,7 +128,7 @@ var stub = function () {
128
128
  /**
129
129
  * @ignore
130
130
  */
131
- var initialContext = __assign(__assign({}, initialAuthState), { buildAuthorizeUrl: stub, buildLogoutUrl: stub, getAccessTokenSilently: stub, getAccessTokenWithPopup: stub, getIdTokenClaims: stub, loginWithCustomTokenExchange: stub, customTokenExchange: stub, exchangeToken: stub, loginWithRedirect: stub, loginWithPopup: stub, connectAccountWithRedirect: stub, logout: stub, handleRedirectCallback: stub, getDpopNonce: stub, setDpopNonce: stub, generateDpopProof: stub, createFetcher: stub, getConfiguration: stub, mfa: {
131
+ var initialContext = __assign(__assign({}, initialAuthState), { buildAuthorizeUrl: stub, buildLogoutUrl: stub, getAccessTokenSilently: stub, getAccessTokenWithPopup: stub, getIdTokenClaims: stub, loginWithCustomTokenExchange: stub, customTokenExchange: stub, exchangeToken: stub, loginWithRedirect: stub, loginWithPopup: stub, connectAccountWithRedirect: stub, logout: stub, revokeRefreshToken: stub, handleRedirectCallback: stub, getDpopNonce: stub, setDpopNonce: stub, generateDpopProof: stub, createFetcher: stub, getConfiguration: stub, mfa: {
132
132
  getAuthenticators: stub,
133
133
  enroll: stub,
134
134
  challenge: stub,
@@ -253,7 +253,7 @@ var toAuth0ClientOptions = function (opts) {
253
253
  deprecateRedirectUri(opts);
254
254
  return __assign(__assign({}, opts), { auth0Client: {
255
255
  name: 'auth0-react',
256
- version: '2.20.0',
256
+ version: '2.21.0',
257
257
  } });
258
258
  };
259
259
  /**
@@ -382,6 +382,9 @@ var Auth0Provider = function (opts) {
382
382
  });
383
383
  });
384
384
  }, [client]);
385
+ var revokeRefreshToken = useCallback(function (options) {
386
+ return client.revokeRefreshToken(options);
387
+ }, [client]);
385
388
  var getAccessTokenSilently = useCallback(
386
389
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
387
390
  function (opts) { return __awaiter(void 0, void 0, void 0, function () {
@@ -579,7 +582,7 @@ var Auth0Provider = function (opts) {
579
582
  }); }, [client]);
580
583
  var passkey = useMemo(function () { return ({ signup: passkeySignup, login: passkeyLogin }); }, [passkeySignup, passkeyLogin]);
581
584
  var contextValue = useMemo(function () {
582
- return __assign(__assign({}, state), { getAccessTokenSilently: getAccessTokenSilently, getAccessTokenWithPopup: getAccessTokenWithPopup, getIdTokenClaims: getIdTokenClaims, loginWithCustomTokenExchange: loginWithCustomTokenExchange, customTokenExchange: customTokenExchange, exchangeToken: exchangeToken, loginWithRedirect: loginWithRedirect, loginWithPopup: loginWithPopup, connectAccountWithRedirect: connectAccountWithRedirect, logout: logout, handleRedirectCallback: handleRedirectCallback, getDpopNonce: getDpopNonce, setDpopNonce: setDpopNonce, generateDpopProof: generateDpopProof, createFetcher: createFetcher, getConfiguration: getConfiguration, mfa: mfa, passkey: passkey, myAccount: myAccount });
585
+ return __assign(__assign({}, state), { getAccessTokenSilently: getAccessTokenSilently, getAccessTokenWithPopup: getAccessTokenWithPopup, getIdTokenClaims: getIdTokenClaims, loginWithCustomTokenExchange: loginWithCustomTokenExchange, customTokenExchange: customTokenExchange, exchangeToken: exchangeToken, loginWithRedirect: loginWithRedirect, loginWithPopup: loginWithPopup, connectAccountWithRedirect: connectAccountWithRedirect, logout: logout, revokeRefreshToken: revokeRefreshToken, handleRedirectCallback: handleRedirectCallback, getDpopNonce: getDpopNonce, setDpopNonce: setDpopNonce, generateDpopProof: generateDpopProof, createFetcher: createFetcher, getConfiguration: getConfiguration, mfa: mfa, passkey: passkey, myAccount: myAccount });
583
586
  }, [
584
587
  state,
585
588
  getAccessTokenSilently,
@@ -592,6 +595,7 @@ var Auth0Provider = function (opts) {
592
595
  loginWithPopup,
593
596
  connectAccountWithRedirect,
594
597
  logout,
598
+ revokeRefreshToken,
595
599
  handleRedirectCallback,
596
600
  getDpopNonce,
597
601
  setDpopNonce,