-
Notifications
You must be signed in to change notification settings - Fork 276
/
Copy pathAuth0ProviderOptions.html
105 lines (105 loc) · 59.6 KB
/
Auth0ProviderOptions.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Auth0ProviderOptions | @auth0/auth0-react</title><meta name="description" content="Documentation for @auth0/auth0-react"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-search"></use></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div><div class="field"><div id="tsd-toolbar-links"></div></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@auth0/auth0-react</a></div><div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@auth0/auth0-react</a></li><li><a href="Auth0ProviderOptions.html">Auth0ProviderOptions</a></li></ul><h1>Interface Auth0ProviderOptions</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>The main configuration to instantiate the <code>Auth0Provider</code>.</p>
</div><div class="tsd-comment tsd-typography"></div></section><div class="tsd-signature"><span class="tsd-signature-keyword">interface </span><span class="tsd-kind-interface">Auth0ProviderOptions</span> <span class="tsd-signature-symbol">{ </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#auth0Client">auth0Client</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">env</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">{ </span><br/><span> </span>[<span class="tsd-kind-index-signature">key</span>: <span class="tsd-signature-type">string</span>]<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">name</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">version</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#authorizationParams">authorizationParams</a><span class="tsd-signature-symbol">?: </span><a href="AuthorizationParams.html" class="tsd-signature-type tsd-kind-interface">AuthorizationParams</a><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#authorizeTimeoutInSeconds">authorizeTimeoutInSeconds</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#cache">cache</a><span class="tsd-signature-symbol">?: </span><a href="ICache.html" class="tsd-signature-type tsd-kind-interface">ICache</a><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#cacheLocation">cacheLocation</a><span class="tsd-signature-symbol">?: </span><a href="../types/CacheLocation.html" class="tsd-signature-type tsd-kind-type-alias">CacheLocation</a><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#children">children</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">ReactNode</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#clientId">clientId</a><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#context">context</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Context</span><span class="tsd-signature-symbol"><</span><a href="Auth0ContextInterface.html" class="tsd-signature-type tsd-kind-interface">Auth0ContextInterface</a><span class="tsd-signature-symbol"><</span><a href="../classes/User.html" class="tsd-signature-type tsd-kind-class">User</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#cookieDomain">cookieDomain</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#domain">domain</a><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#httpTimeoutInSeconds">httpTimeoutInSeconds</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#issuer">issuer</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#leeway">leeway</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#legacySameSiteCookie">legacySameSiteCookie</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#nowProvider">nowProvider</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#onRedirectCallback">onRedirectCallback</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">appState</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">user</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#sessionCheckExpiryDays">sessionCheckExpiryDays</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#skipRedirectCallback">skipRedirectCallback</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#useCookiesForTransactions">useCookiesForTransactions</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#useFormData">useFormData</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#useRefreshTokens">useRefreshTokens</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#useRefreshTokensFallback">useRefreshTokensFallback</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">; </span><br/><span> </span><a class="tsd-kind-property" href="Auth0ProviderOptions.html#workerUrl">workerUrl</a><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div><section class="tsd-panel tsd-hierarchy"><h4>Hierarchy</h4><ul class="tsd-hierarchy"><li><span class="tsd-signature-type">Auth0ClientOptions</span><ul class="tsd-hierarchy"><li><span class="target">Auth0ProviderOptions</span></li></ul></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/auth0/auth0-react/blob/4efd44fbc5dead4c393197ad7965b11904dca3bc/src/auth0-provider.tsx#L44">src/auth0-provider.tsx:44</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex="0"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><use href="../assets/icons.svg#icon-chevronSmall"></use></svg> Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="Auth0ProviderOptions.html#auth0Client" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>auth0<wbr/>Client?</span></a>
<a href="Auth0ProviderOptions.html#authorizationParams" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>authorization<wbr/>Params?</span></a>
<a href="Auth0ProviderOptions.html#authorizeTimeoutInSeconds" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>authorize<wbr/>Timeout<wbr/>In<wbr/>Seconds?</span></a>
<a href="Auth0ProviderOptions.html#cache" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>cache?</span></a>
<a href="Auth0ProviderOptions.html#cacheLocation" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>cache<wbr/>Location?</span></a>
<a href="Auth0ProviderOptions.html#children" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>children?</span></a>
<a href="Auth0ProviderOptions.html#clientId" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>client<wbr/>Id</span></a>
<a href="Auth0ProviderOptions.html#context" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>context?</span></a>
<a href="Auth0ProviderOptions.html#cookieDomain" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>cookie<wbr/>Domain?</span></a>
<a href="Auth0ProviderOptions.html#domain" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>domain</span></a>
<a href="Auth0ProviderOptions.html#httpTimeoutInSeconds" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>http<wbr/>Timeout<wbr/>In<wbr/>Seconds?</span></a>
<a href="Auth0ProviderOptions.html#issuer" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>issuer?</span></a>
<a href="Auth0ProviderOptions.html#leeway" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>leeway?</span></a>
<a href="Auth0ProviderOptions.html#legacySameSiteCookie" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>legacy<wbr/>Same<wbr/>Site<wbr/>Cookie?</span></a>
<a href="Auth0ProviderOptions.html#nowProvider" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>now<wbr/>Provider?</span></a>
<a href="Auth0ProviderOptions.html#onRedirectCallback" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>on<wbr/>Redirect<wbr/>Callback?</span></a>
<a href="Auth0ProviderOptions.html#sessionCheckExpiryDays" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>session<wbr/>Check<wbr/>Expiry<wbr/>Days?</span></a>
<a href="Auth0ProviderOptions.html#skipRedirectCallback" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>skip<wbr/>Redirect<wbr/>Callback?</span></a>
<a href="Auth0ProviderOptions.html#useCookiesForTransactions" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Cookies<wbr/>For<wbr/>Transactions?</span></a>
<a href="Auth0ProviderOptions.html#useFormData" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Form<wbr/>Data?</span></a>
<a href="Auth0ProviderOptions.html#useRefreshTokens" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Refresh<wbr/>Tokens?</span></a>
<a href="Auth0ProviderOptions.html#useRefreshTokensFallback" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Refresh<wbr/>Tokens<wbr/>Fallback?</span></a>
<a href="Auth0ProviderOptions.html#workerUrl" class="tsd-index-link tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>worker<wbr/>Url?</span></a>
</div></section></div></details></section></section><section class="tsd-panel-group tsd-member-group"><h2>Properties</h2><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="auth0Client" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <code class="tsd-tag ts-flagInternal">Internal</code> <span>auth0<wbr/>Client</span><a href="#auth0Client" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">auth0<wbr/>Client</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">{ </span><br/><span> </span><span class="tsd-kind-property">env</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">{ </span><br/><span> </span>[<span class="tsd-kind-index-signature">key</span>: <span class="tsd-signature-type">string</span>]<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">name</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span><span class="tsd-kind-property">version</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></div><div class="tsd-comment tsd-typography"><p>Internal property to send information about the client to the authorization server.</p>
</div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-property">env</span><span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">{ </span><br/><span> </span>[<span class="tsd-kind-index-signature">key</span>: <span class="tsd-signature-type">string</span>]<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-index-signature"><h5><span class="tsd-signature-symbol">[</span><span class="tsd-kind-parameter">key</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">]: </span><span class="tsd-signature-type">string</span></h5></li></ul></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">name</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li><li class="tsd-parameter"><h5><span class="tsd-kind-property">version</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Auth0ClientOptions.auth0Client</p><ul><li>Defined in node_modules/@auth0/auth0-spa-js/dist/typings/global.d.ts:176</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="authorizationParams" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>authorization<wbr/>Params</span><a href="#authorizationParams" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">authorization<wbr/>Params</span><span class="tsd-signature-symbol">?:</span> <a href="AuthorizationParams.html" class="tsd-signature-type tsd-kind-interface">AuthorizationParams</a></div><div class="tsd-comment tsd-typography"><p>URL parameters that will be sent back to the Authorization Server. This can be known parameters
defined by Auth0 or custom parameters that you define.</p>
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Auth0ClientOptions.authorizationParams</p><ul><li>Defined in node_modules/@auth0/auth0-spa-js/dist/typings/global.d.ts:101</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="authorizeTimeoutInSeconds" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>authorize<wbr/>Timeout<wbr/>In<wbr/>Seconds</span><a href="#authorizeTimeoutInSeconds" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">authorize<wbr/>Timeout<wbr/>In<wbr/>Seconds</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>A maximum number of seconds to wait before declaring background calls to /authorize as failed for timeout
Defaults to 60s.</p>
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Auth0ClientOptions.authorizeTimeoutInSeconds</p><ul><li>Defined in node_modules/@auth0/auth0-spa-js/dist/typings/global.d.ts:167</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="cache" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>cache</span><a href="#cache" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">cache</span><span class="tsd-signature-symbol">?:</span> <a href="ICache.html" class="tsd-signature-type tsd-kind-interface">ICache</a></div><div class="tsd-comment tsd-typography"><p>Specify a custom cache implementation to use for token storage and retrieval. This setting takes precedence over <code>cacheLocation</code> if they are both specified.</p>
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Auth0ClientOptions.cache</p><ul><li>Defined in node_modules/@auth0/auth0-spa-js/dist/typings/global.d.ts:134</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="cacheLocation" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>cache<wbr/>Location</span><a href="#cacheLocation" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">cache<wbr/>Location</span><span class="tsd-signature-symbol">?:</span> <a href="../types/CacheLocation.html" class="tsd-signature-type tsd-kind-type-alias">CacheLocation</a></div><div class="tsd-comment tsd-typography"><p>The location to use when storing cache data. Valid values are <code>memory</code> or <code>localstorage</code>.
The default setting is <code>memory</code>.</p>
<p>Read more about <a href="https://auth0.com/docs/libraries/auth0-single-page-app-sdk#change-storage-options">changing storage options in the Auth0 docs</a></p>
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Auth0ClientOptions.cacheLocation</p><ul><li>Defined in node_modules/@auth0/auth0-spa-js/dist/typings/global.d.ts:130</li></ul></aside></section><section class="tsd-panel tsd-member"><a id="children" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>children</span><a href="#children" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">children</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">ReactNode</span></div><div class="tsd-comment tsd-typography"><p>The child nodes your Provider has wrapped</p>
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/auth0/auth0-react/blob/4efd44fbc5dead4c393197ad7965b11904dca3bc/src/auth0-provider.tsx#L48">src/auth0-provider.tsx:48</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="clientId" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>client<wbr/>Id</span><a href="#clientId" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">client<wbr/>Id</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>The Client ID found on your Application settings page</p>
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Auth0ClientOptions.clientId</p><ul><li>Defined in node_modules/@auth0/auth0-spa-js/dist/typings/global.d.ts:117</li></ul></aside></section><section class="tsd-panel tsd-member"><a id="context" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>context</span><a href="#context" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">context</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">Context</span><span class="tsd-signature-symbol"><</span><a href="Auth0ContextInterface.html" class="tsd-signature-type tsd-kind-interface">Auth0ContextInterface</a><span class="tsd-signature-symbol"><</span><a href="../classes/User.html" class="tsd-signature-type tsd-kind-class">User</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></div><div class="tsd-comment tsd-typography"><p>Context to be used when creating the Auth0Provider, defaults to the internally created context.</p>
<p>This allows multiple Auth0Providers to be nested within the same application, the context value can then be
passed to useAuth0, withAuth0, or withAuthenticationRequired to use that specific Auth0Provider to access
auth state and methods specifically tied to the provider that the context belongs to.</p>
<p>When using multiple Auth0Providers in a single application you should do the following to ensure sessions are not
overwritten:</p>
<ul>
<li>Configure a different redirect_uri for each Auth0Provider, and set skipRedirectCallback for each provider to ignore
the others redirect_uri</li>
<li>If using localstorage for both Auth0Providers, ensure that the audience and scope are different for so that the key
used to store data is different</li>
</ul>
<p>For a sample on using multiple Auth0Providers review the <a href="https://github.com/auth0-samples/auth0-link-accounts-sample/tree/react-variant">React Account Linking Sample</a></p>
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/auth0/auth0-react/blob/4efd44fbc5dead4c393197ad7965b11904dca3bc/src/auth0-provider.tsx#L86">src/auth0-provider.tsx:86</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="cookieDomain" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>cookie<wbr/>Domain</span><a href="#cookieDomain" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">cookie<wbr/>Domain</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>The domain the cookie is accessible from. If not set, the cookie is scoped to
the current domain, including the subdomain.</p>
<p>Note: setting this incorrectly may cause silent authentication to stop working
on page load.</p>
<p>To keep a user logged in across multiple subdomains set this to your
top-level domain and prefixed with a <code>.</code> (eg: <code>.example.com</code>).</p>
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Auth0ClientOptions.cookieDomain</p><ul><li>Defined in node_modules/@auth0/auth0-spa-js/dist/typings/global.d.ts:220</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="domain" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span>domain</span><a href="#domain" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">domain</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>Your Auth0 account domain such as <code>'example.auth0.com'</code>,
<code>'example.eu.auth0.com'</code> or , <code>'example.mycompany.com'</code>
(when using <a href="https://auth0.com/docs/custom-domains">custom domains</a>)</p>
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Auth0ClientOptions.domain</p><ul><li>Defined in node_modules/@auth0/auth0-spa-js/dist/typings/global.d.ts:109</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="httpTimeoutInSeconds" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>http<wbr/>Timeout<wbr/>In<wbr/>Seconds</span><a href="#httpTimeoutInSeconds" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">http<wbr/>Timeout<wbr/>In<wbr/>Seconds</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>Specify the timeout for HTTP calls using <code>fetch</code>. The default is 10 seconds.</p>
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Auth0ClientOptions.httpTimeoutInSeconds</p><ul><li>Defined in node_modules/@auth0/auth0-spa-js/dist/typings/global.d.ts:171</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="issuer" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>issuer</span><a href="#issuer" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">issuer</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>The issuer to be used for validation of JWTs, optionally defaults to the domain above</p>
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Auth0ClientOptions.issuer</p><ul><li>Defined in node_modules/@auth0/auth0-spa-js/dist/typings/global.d.ts:113</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="leeway" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>leeway</span><a href="#leeway" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">leeway</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>The value in seconds used to account for clock skew in JWT expirations.
Typically, this value is no more than a minute or two at maximum.
Defaults to 60s.</p>
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Auth0ClientOptions.leeway</p><ul><li>Defined in node_modules/@auth0/auth0-spa-js/dist/typings/global.d.ts:123</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="legacySameSiteCookie" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>legacy<wbr/>Same<wbr/>Site<wbr/>Cookie</span><a href="#legacySameSiteCookie" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">legacy<wbr/>Same<wbr/>Site<wbr/>Cookie</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>Sets an additional cookie with no SameSite attribute to support legacy browsers
that are not compatible with the latest SameSite changes.
This will log a warning on modern browsers, you can disable the warning by setting
this to false but be aware that some older useragents will not work,
See <a href="https://www.chromium.org/updates/same-site/incompatible-clients">https://www.chromium.org/updates/same-site/incompatible-clients</a>
Defaults to true</p>
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Auth0ClientOptions.legacySameSiteCookie</p><ul><li>Defined in node_modules/@auth0/auth0-spa-js/dist/typings/global.d.ts:191</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="nowProvider" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>now<wbr/>Provider</span><a href="#nowProvider" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">now<wbr/>Provider</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span></div><div class="tsd-comment tsd-typography"><p>Modify the value used as the current time during the token validation.</p>
<p><strong>Note</strong>: Using this improperly can potentially compromise the token validation.</p>
</div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature" id="nowProvider.__type-2.__type-3"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></li><li class="tsd-description"><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">></span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Auth0ClientOptions.nowProvider</p><ul><li>Defined in node_modules/@auth0/auth0-spa-js/dist/typings/global.d.ts:233</li></ul></aside></section><section class="tsd-panel tsd-member"><a id="onRedirectCallback" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>on<wbr/>Redirect<wbr/>Callback</span><a href="#onRedirectCallback" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">on<wbr/>Redirect<wbr/>Callback</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">appState</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">user</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></div><div class="tsd-comment tsd-typography"><p>By default this removes the code and state parameters from the url when you are redirected from the authorize page.
It uses <code>window.history</code> but you might want to overwrite this if you are using a custom router, like <code>react-router-dom</code>
See the EXAMPLES.md for more info.</p>
</div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures"><li class="tsd-signature" id="onRedirectCallback.__type-4.__type-5"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">appState</span><span class="tsd-signature-symbol">?</span>, <span class="tsd-kind-parameter">user</span><span class="tsd-signature-symbol">?</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">appState</span>: <a href="../types/AppState.html" class="tsd-signature-type tsd-kind-type-alias">AppState</a></span></li><li><span><code class="tsd-tag ts-flagOptional">Optional</code> <span class="tsd-kind-parameter">user</span>: <a href="../classes/User.html" class="tsd-signature-type tsd-kind-class">User</a></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/auth0/auth0-react/blob/4efd44fbc5dead4c393197ad7965b11904dca3bc/src/auth0-provider.tsx#L54">src/auth0-provider.tsx:54</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="sessionCheckExpiryDays" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>session<wbr/>Check<wbr/>Expiry<wbr/>Days</span><a href="#sessionCheckExpiryDays" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">session<wbr/>Check<wbr/>Expiry<wbr/>Days</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span></div><div class="tsd-comment tsd-typography"><p>Number of days until the cookie <code>auth0.is.authenticated</code> will expire
Defaults to 1.</p>
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Auth0ClientOptions.sessionCheckExpiryDays</p><ul><li>Defined in node_modules/@auth0/auth0-spa-js/dist/typings/global.d.ts:208</li></ul></aside></section><section class="tsd-panel tsd-member"><a id="skipRedirectCallback" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>skip<wbr/>Redirect<wbr/>Callback</span><a href="#skipRedirectCallback" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">skip<wbr/>Redirect<wbr/>Callback</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>By default, if the page url has code/state params, the SDK will treat them as Auth0's and attempt to exchange the
code for a token. In some cases the code might be for something else (another OAuth SDK perhaps). In these
instances you can instruct the client to ignore them eg</p>
<pre><code class="language-jsx"><span class="hl-8"><</span><span class="hl-9">Auth0Provider</span><br/><span class="hl-1"> </span><span class="hl-10">clientId</span><span class="hl-1">=</span><span class="hl-6">{</span><span class="hl-5">clientId</span><span class="hl-6">}</span><br/><span class="hl-1"> </span><span class="hl-10">domain</span><span class="hl-1">=</span><span class="hl-6">{</span><span class="hl-5">domain</span><span class="hl-6">}</span><br/><span class="hl-1"> </span><span class="hl-10">skipRedirectCallback</span><span class="hl-1">=</span><span class="hl-6">{</span><span class="hl-5">window</span><span class="hl-11">.</span><span class="hl-5">location</span><span class="hl-11">.</span><span class="hl-5">pathname</span><span class="hl-11"> </span><span class="hl-1">===</span><span class="hl-11"> </span><span class="hl-2">'/stripe-oauth-callback'</span><span class="hl-6">}</span><br/><span class="hl-8">></span>
</code><button>Copy</button></pre>
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/auth0/auth0-react/blob/4efd44fbc5dead4c393197ad7965b11904dca3bc/src/auth0-provider.tsx#L68">src/auth0-provider.tsx:68</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="useCookiesForTransactions" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>use<wbr/>Cookies<wbr/>For<wbr/>Transactions</span><a href="#useCookiesForTransactions" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">use<wbr/>Cookies<wbr/>For<wbr/>Transactions</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>If <code>true</code>, the SDK will use a cookie when storing information about the auth transaction while
the user is going through the authentication flow on the authorization server.</p>
<p>The default is <code>false</code>, in which case the SDK will use session storage.</p>
</div><div class="tsd-comment tsd-typography"><h4>Notes</h4><p>You might want to enable this if you rely on your users being able to authenticate using flows that
may end up spanning across multiple tabs (e.g. magic links) or you cannot otherwise rely on session storage being available.</p>
</div><aside class="tsd-sources"><p>Inherited from Auth0ClientOptions.useCookiesForTransactions</p><ul><li>Defined in node_modules/@auth0/auth0-spa-js/dist/typings/global.d.ts:203</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="useFormData" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>use<wbr/>Form<wbr/>Data</span><a href="#useFormData" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">use<wbr/>Form<wbr/>Data</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>If true, data to the token endpoint is transmitted as x-www-form-urlencoded data, if false it will be transmitted as JSON. The default setting is <code>true</code>.</p>
<p><strong>Note:</strong> Setting this to <code>false</code> may affect you if you use Auth0 Rules and are sending custom, non-primitive data. If you disable this,
please verify that your Auth0 Rules continue to work as intended.</p>
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Auth0ClientOptions.useFormData</p><ul><li>Defined in node_modules/@auth0/auth0-spa-js/dist/typings/global.d.ts:227</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="useRefreshTokens" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>use<wbr/>Refresh<wbr/>Tokens</span><a href="#useRefreshTokens" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">use<wbr/>Refresh<wbr/>Tokens</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>If true, refresh tokens are used to fetch new access tokens from the Auth0 server. If false, the legacy technique of using a hidden iframe and the <code>authorization_code</code> grant with <code>prompt=none</code> is used.
The default setting is <code>false</code>.</p>
<p><strong>Note</strong>: Use of refresh tokens must be enabled by an administrator on your Auth0 client application.</p>
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Auth0ClientOptions.useRefreshTokens</p><ul><li>Defined in node_modules/@auth0/auth0-spa-js/dist/typings/global.d.ts:141</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="useRefreshTokensFallback" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>use<wbr/>Refresh<wbr/>Tokens<wbr/>Fallback</span><a href="#useRefreshTokensFallback" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">use<wbr/>Refresh<wbr/>Tokens<wbr/>Fallback</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span></div><div class="tsd-comment tsd-typography"><p>If true, fallback to the technique of using a hidden iframe and the <code>authorization_code</code> grant with <code>prompt=none</code> when unable to use refresh tokens. If false, the iframe fallback is not used and
errors relating to a failed <code>refresh_token</code> grant should be handled appropriately. The default setting is <code>false</code>.</p>
<p><strong>Note</strong>: There might be situations where doing silent auth with a Web Message response from an iframe is not possible,
like when you're serving your application from the file system or a custom protocol (like in a Desktop or Native app).
In situations like this you can disable the iframe fallback and handle the failed <code>refresh_token</code> grant and prompt the user to login interactively with <code>loginWithRedirect</code> or <code>loginWithPopup</code>."</p>
<p>E.g. Using the <code>file:</code> protocol in an Electron application does not support that legacy technique.</p>
</div><div class="tsd-comment tsd-typography"><h4>Example</h4><pre><code class="language-ts"><span class="hl-6">let</span><span class="hl-1"> </span><span class="hl-5">token</span><span class="hl-1">: </span><span class="hl-9">string</span><span class="hl-1">;</span><br/><span class="hl-4">try</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-5">token</span><span class="hl-1"> = </span><span class="hl-4">await</span><span class="hl-1"> </span><span class="hl-5">auth0</span><span class="hl-1">.</span><span class="hl-0">getTokenSilently</span><span class="hl-1">();</span><br/><span class="hl-1">} </span><span class="hl-4">catch</span><span class="hl-1"> (</span><span class="hl-5">e</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-4">if</span><span class="hl-1"> (</span><span class="hl-5">e</span><span class="hl-1">.</span><span class="hl-5">error</span><span class="hl-1"> === </span><span class="hl-2">'missing_refresh_token'</span><span class="hl-1"> || </span><span class="hl-5">e</span><span class="hl-1">.</span><span class="hl-5">error</span><span class="hl-1"> === </span><span class="hl-2">'invalid_grant'</span><span class="hl-1">) {</span><br/><span class="hl-1"> </span><span class="hl-5">auth0</span><span class="hl-1">.</span><span class="hl-0">loginWithRedirect</span><span class="hl-1">();</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">}</span>
</code><button>Copy</button></pre>
</div><aside class="tsd-sources"><p>Inherited from Auth0ClientOptions.useRefreshTokensFallback</p><ul><li>Defined in node_modules/@auth0/auth0-spa-js/dist/typings/global.d.ts:162</li></ul></aside></section><section class="tsd-panel tsd-member tsd-is-inherited tsd-is-external"><a id="workerUrl" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>worker<wbr/>Url</span><a href="#workerUrl" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">worker<wbr/>Url</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><div class="tsd-comment tsd-typography"><p>If provided, the SDK will load the token worker from this URL instead of the integrated <code>blob</code>. An example of when this is useful is if you have strict
Content-Security-Policy (CSP) and wish to avoid needing to set <code>worker-src: blob:</code>. We recommend either serving the worker, which you can find in the module
at <code><module_path>/dist/auth0-spa-js.worker.production.js</code>, from the same host as your application or using the Auth0 CDN
<code>https://cdn.auth0.com/js/auth0-spa-js/<version>/auth0-spa-js.worker.production.js</code>.</p>
<p><strong>Note</strong>: The worker is only used when <code>useRefreshTokens: true</code>, <code>cacheLocation: 'memory'</code>, and the <code>cache</code> is not custom.</p>
</div><div class="tsd-comment tsd-typography"></div><aside class="tsd-sources"><p>Inherited from Auth0ClientOptions.workerUrl</p><ul><li>Defined in node_modules/@auth0/auth0-spa-js/dist/typings/global.d.ts:242</li></ul></aside></section></section></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-index-accordion"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><h4 class="uppercase">Member Visibility</h4><form><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div><div class="tsd-theme-toggle"><h4 class="uppercase">Theme</h4><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-index-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>On This Page</h3></summary><div class="tsd-accordion-details"><a href="#auth0Client" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>auth0<wbr/>Client</span></a><a href="#authorizationParams" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>authorization<wbr/>Params</span></a><a href="#authorizeTimeoutInSeconds" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>authorize<wbr/>Timeout<wbr/>In<wbr/>Seconds</span></a><a href="#cache" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>cache</span></a><a href="#cacheLocation" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>cache<wbr/>Location</span></a><a href="#children" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>children</span></a><a href="#clientId" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>client<wbr/>Id</span></a><a href="#context" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>context</span></a><a href="#cookieDomain" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>cookie<wbr/>Domain</span></a><a href="#domain" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>domain</span></a><a href="#httpTimeoutInSeconds" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>http<wbr/>Timeout<wbr/>In<wbr/>Seconds</span></a><a href="#issuer" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>issuer</span></a><a href="#leeway" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>leeway</span></a><a href="#legacySameSiteCookie" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>legacy<wbr/>Same<wbr/>Site<wbr/>Cookie</span></a><a href="#nowProvider" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>now<wbr/>Provider</span></a><a href="#onRedirectCallback" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>on<wbr/>Redirect<wbr/>Callback</span></a><a href="#sessionCheckExpiryDays" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>session<wbr/>Check<wbr/>Expiry<wbr/>Days</span></a><a href="#skipRedirectCallback" class=""><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>skip<wbr/>Redirect<wbr/>Callback</span></a><a href="#useCookiesForTransactions" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Cookies<wbr/>For<wbr/>Transactions</span></a><a href="#useFormData" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Form<wbr/>Data</span></a><a href="#useRefreshTokens" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Refresh<wbr/>Tokens</span></a><a href="#useRefreshTokensFallback" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>use<wbr/>Refresh<wbr/>Tokens<wbr/>Fallback</span></a><a href="#workerUrl" class="tsd-is-inherited tsd-is-external"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1024"></use></svg><span>worker<wbr/>Url</span></a></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24"><use href="../assets/icons.svg#icon-1"></use></svg><span>@auth0/auth0-react</span></a><ul class="tsd-small-nested-navigation" id="tsd-nav-container" data-base=".."><li>Loading...</li></ul></nav></div></div></div><footer></footer><div class="overlay"></div></body></html>