Skip to content

Commit 2d84fc5

Browse files
Release v2.2.2 (#639)
1 parent 11e6636 commit 2d84fc5

20 files changed

+99
-91
lines changed

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Change Log
22

3+
## [v2.2.2](https://github.com/auth0/auth0-react/tree/v2.2.2) (2023-10-31)
4+
[Full Changelog](https://github.com/auth0/auth0-react/compare/v2.2.1...v2.2.2)
5+
6+
**Fixed**
7+
- Export all errors from SPA-JS [\#637](https://github.com/auth0/auth0-react/pull/637) ([frederikprijck](https://github.com/frederikprijck))
8+
9+
**Changed**
10+
- Make OAuthError extend GenericError [\#638](https://github.com/auth0/auth0-react/pull/638) ([frederikprijck](https://github.com/frederikprijck))
11+
312
## [v2.2.1](https://github.com/auth0/auth0-react/tree/v2.2.1) (2023-08-22)
413
[Full Changelog](https://github.com/auth0/auth0-react/compare/v2.2.0...v2.2.1)
514

docs/assets/highlight.css

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
:root {
2-
--light-hl-0: #000000;
3-
--dark-hl-0: #D4D4D4;
4-
--light-hl-1: #A31515;
5-
--dark-hl-1: #CE9178;
6-
--light-hl-2: #008000;
7-
--dark-hl-2: #6A9955;
8-
--light-hl-3: #AF00DB;
9-
--dark-hl-3: #C586C0;
10-
--light-hl-4: #001080;
11-
--dark-hl-4: #9CDCFE;
12-
--light-hl-5: #0000FF;
13-
--dark-hl-5: #569CD6;
14-
--light-hl-6: #0070C1;
15-
--dark-hl-6: #4FC1FF;
16-
--light-hl-7: #795E26;
17-
--dark-hl-7: #DCDCAA;
2+
--light-hl-0: #795E26;
3+
--dark-hl-0: #DCDCAA;
4+
--light-hl-1: #000000;
5+
--dark-hl-1: #D4D4D4;
6+
--light-hl-2: #A31515;
7+
--dark-hl-2: #CE9178;
8+
--light-hl-3: #008000;
9+
--dark-hl-3: #6A9955;
10+
--light-hl-4: #AF00DB;
11+
--dark-hl-4: #C586C0;
12+
--light-hl-5: #001080;
13+
--dark-hl-5: #9CDCFE;
14+
--light-hl-6: #0000FF;
15+
--dark-hl-6: #569CD6;
16+
--light-hl-7: #0070C1;
17+
--dark-hl-7: #4FC1FF;
1818
--light-hl-8: #800000;
1919
--dark-hl-8: #808080;
2020
--light-hl-9: #267F99;

docs/assets/main.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/assets/style.css

+4-5
Original file line numberDiff line numberDiff line change
@@ -483,10 +483,9 @@ blockquote {
483483
.has-menu .col-menu {
484484
visibility: visible;
485485
transform: translate(0, 0);
486-
display: grid;
487-
align-items: center;
488-
grid-template-rows: auto 1fr;
489-
grid-gap: 1.5rem;
486+
display: flex;
487+
flex-direction: column;
488+
gap: 1.5rem;
490489
max-height: 100vh;
491490
padding: 1rem 2rem;
492491
}
@@ -911,7 +910,7 @@ a.tsd-index-link {
911910
margin-right: 0.8rem;
912911
}
913912

914-
@media (min-width: 1024px) {
913+
@media (min-width: 1025px) {
915914
.col-content {
916915
margin: 2rem auto;
917916
}

docs/classes/OAuthError.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ <h4>Hierarchy</h4>
2727
<ul class="tsd-hierarchy">
2828
<li><span class="target">OAuthError</span></li></ul></li></ul></section><aside class="tsd-sources">
2929
<ul>
30-
<li>Defined in <a href="https://github.com/auth0/auth0-react/blob/3fc0faa/src/errors.tsx#L7">src/errors.tsx:7</a></li></ul></aside>
30+
<li>Defined in <a href="https://github.com/auth0/auth0-react/blob/e55aa3a/src/errors.tsx#L7">src/errors.tsx:7</a></li></ul></aside>
3131
<section class="tsd-panel-group tsd-index-group">
3232
<section class="tsd-panel tsd-index-panel">
3333
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
@@ -68,19 +68,19 @@ <h5><code class="tsd-tag ts-flagOptional">Optional</code> error_description: <sp
6868
<h4 class="tsd-returns-title">Returns <a href="OAuthError.html" class="tsd-signature-type" data-tsd-kind="Class">OAuthError</a></h4><aside class="tsd-sources">
6969
<p>Overrides Error.constructor</p>
7070
<ul>
71-
<li>Defined in <a href="https://github.com/auth0/auth0-react/blob/3fc0faa/src/errors.tsx#L8">src/errors.tsx:8</a></li></ul></aside></li></ul></section></section>
71+
<li>Defined in <a href="https://github.com/auth0/auth0-react/blob/e55aa3a/src/errors.tsx#L8">src/errors.tsx:8</a></li></ul></aside></li></ul></section></section>
7272
<section class="tsd-panel-group tsd-member-group">
7373
<h2>Properties</h2>
7474
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="error" class="tsd-anchor"></a>
7575
<h3 class="tsd-anchor-link"><span>error</span><a href="#error" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
7676
<div class="tsd-signature">error<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
7777
<ul>
78-
<li>Defined in <a href="https://github.com/auth0/auth0-react/blob/3fc0faa/src/errors.tsx#L8">src/errors.tsx:8</a></li></ul></aside></section>
78+
<li>Defined in <a href="https://github.com/auth0/auth0-react/blob/e55aa3a/src/errors.tsx#L8">src/errors.tsx:8</a></li></ul></aside></section>
7979
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="error_description" class="tsd-anchor"></a>
8080
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagOptional">Optional</code> <span>error_<wbr/>description</span><a href="#error_description" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
8181
<div class="tsd-signature">error_<wbr/>description<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
8282
<ul>
83-
<li>Defined in <a href="https://github.com/auth0/auth0-react/blob/3fc0faa/src/errors.tsx#L8">src/errors.tsx:8</a></li></ul></aside></section>
83+
<li>Defined in <a href="https://github.com/auth0/auth0-react/blob/e55aa3a/src/errors.tsx#L8">src/errors.tsx:8</a></li></ul></aside></section>
8484
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited tsd-is-external"><a id="message" class="tsd-anchor"></a>
8585
<h3 class="tsd-anchor-link"><span>message</span><a href="#message" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
8686
<div class="tsd-signature">message<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">

docs/functions/Auth0Provider.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h1>Function Auth0Provider</h1></div>
1919
<ul class="tsd-signatures tsd-kind-function">
2020
<li class="tsd-signature tsd-anchor-link" id="Auth0Provider">Auth0<wbr/>Provider<span class="tsd-signature-symbol">(</span>opts<span class="tsd-signature-symbol">: </span><a href="../interfaces/Auth0ProviderOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">Auth0ProviderOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Element</span><a href="#Auth0Provider" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></li>
2121
<li class="tsd-description">
22-
<div class="tsd-comment tsd-typography"><pre><code class="language-jsx"><span class="hl-8">&lt;</span><span class="hl-9">Auth0Provider</span><br/><span class="hl-0"> </span><span class="hl-10">domain</span><span class="hl-0">=</span><span class="hl-5">{</span><span class="hl-4">domain</span><span class="hl-5">}</span><br/><span class="hl-0"> </span><span class="hl-10">clientId</span><span class="hl-0">=</span><span class="hl-5">{</span><span class="hl-4">clientId</span><span class="hl-5">}</span><br/><span class="hl-0"> </span><span class="hl-10">authorizationParams</span><span class="hl-0">=</span><span class="hl-5">{</span><span class="hl-11">{ </span><span class="hl-4">redirect_uri:</span><span class="hl-11"> </span><span class="hl-4">window</span><span class="hl-11">.</span><span class="hl-4">location</span><span class="hl-11">.</span><span class="hl-4">origin</span><span class="hl-11"> }</span><span class="hl-5">}</span><span class="hl-14">}&gt;</span><br/><span class="hl-0"> </span><span class="hl-14">&lt;MyApp</span><span class="hl-0"> </span><span class="hl-8">/&gt;</span><br/><span class="hl-0">&lt;/</span><span class="hl-4">Auth0Provider</span><span class="hl-0">&gt;</span>
22+
<div class="tsd-comment tsd-typography"><pre><code class="language-jsx"><span class="hl-8">&lt;</span><span class="hl-9">Auth0Provider</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">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">authorizationParams</span><span class="hl-1">=</span><span class="hl-6">{</span><span class="hl-11">{ </span><span class="hl-5">redirect_uri:</span><span class="hl-11"> </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">origin</span><span class="hl-11"> }</span><span class="hl-6">}</span><span class="hl-14">}&gt;</span><br/><span class="hl-1"> </span><span class="hl-14">&lt;MyApp</span><span class="hl-1"> </span><span class="hl-8">/&gt;</span><br/><span class="hl-1">&lt;/</span><span class="hl-5">Auth0Provider</span><span class="hl-1">&gt;</span>
2323
</code></pre>
2424
<p>Provides the Auth0Context to its child components.</p>
2525
</div>
@@ -30,7 +30,7 @@ <h4 class="tsd-parameters-title">Parameters</h4>
3030
<h5>opts: <a href="../interfaces/Auth0ProviderOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">Auth0ProviderOptions</a></h5></li></ul></div>
3131
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Element</span></h4><aside class="tsd-sources">
3232
<ul>
33-
<li>Defined in <a href="https://github.com/auth0/auth0-react/blob/3fc0faa/src/auth0-provider.tsx#L135">src/auth0-provider.tsx:135</a></li></ul></aside></li></ul></section></div>
33+
<li>Defined in <a href="https://github.com/auth0/auth0-react/blob/e55aa3a/src/auth0-provider.tsx#L135">src/auth0-provider.tsx:135</a></li></ul></aside></li></ul></section></div>
3434
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
3535
<div class="tsd-navigation settings">
3636
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">

docs/functions/useAuth0.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h1>Function useAuth0</h1></div>
1919
<ul class="tsd-signatures tsd-kind-function">
2020
<li class="tsd-signature tsd-anchor-link" id="useAuth0">use<wbr/>Auth0<span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TUser</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">(</span>context<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Context</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/Auth0ContextInterface.html" class="tsd-signature-type" data-tsd-kind="Interface">Auth0ContextInterface</a><span class="tsd-signature-symbol">&lt;</span><a href="../classes/User.html" class="tsd-signature-type" data-tsd-kind="Class">User</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/Auth0ContextInterface.html" class="tsd-signature-type" data-tsd-kind="Interface">Auth0ContextInterface</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TUser</span><span class="tsd-signature-symbol">&gt;</span><a href="#useAuth0" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none" id="icon-anchor-a"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5" id="icon-anchor-b"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5" id="icon-anchor-c"></path></svg></a></li>
2121
<li class="tsd-description">
22-
<div class="tsd-comment tsd-typography"><pre><code class="language-js"><span class="hl-5">const</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-2">// Auth state:</span><br/><span class="hl-0"> </span><span class="hl-6">error</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-6">isAuthenticated</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-6">isLoading</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-6">user</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-2">// Auth methods:</span><br/><span class="hl-0"> </span><span class="hl-6">getAccessTokenSilently</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-6">getAccessTokenWithPopup</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-6">getIdTokenClaims</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-6">loginWithRedirect</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-6">loginWithPopup</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-6">logout</span><span class="hl-0">,</span><br/><span class="hl-0">} = </span><span class="hl-7">useAuth0</span><span class="hl-0">&lt;</span><span class="hl-9">TUser</span><span class="hl-0">&gt;();</span>
22+
<div class="tsd-comment tsd-typography"><pre><code class="language-js"><span class="hl-6">const</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-3">// Auth state:</span><br/><span class="hl-1"> </span><span class="hl-7">error</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">isAuthenticated</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">isLoading</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">user</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-3">// Auth methods:</span><br/><span class="hl-1"> </span><span class="hl-7">getAccessTokenSilently</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">getAccessTokenWithPopup</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">getIdTokenClaims</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">loginWithRedirect</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">loginWithPopup</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-7">logout</span><span class="hl-1">,</span><br/><span class="hl-1">} = </span><span class="hl-0">useAuth0</span><span class="hl-1">&lt;</span><span class="hl-9">TUser</span><span class="hl-1">&gt;();</span>
2323
</code></pre>
2424
<p>Use the <code>useAuth0</code> hook in your components to access the auth state and methods.</p>
2525
<p>TUser is an optional type param to provide a type to the <code>user</code> field.</p>
@@ -36,7 +36,7 @@ <h4 class="tsd-parameters-title">Parameters</h4>
3636
<h5>context: <span class="tsd-signature-type">Context</span><span class="tsd-signature-symbol">&lt;</span><a href="../interfaces/Auth0ContextInterface.html" class="tsd-signature-type" data-tsd-kind="Interface">Auth0ContextInterface</a><span class="tsd-signature-symbol">&lt;</span><a href="../classes/User.html" class="tsd-signature-type" data-tsd-kind="Class">User</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol"> = Auth0Context</span></h5></li></ul></div>
3737
<h4 class="tsd-returns-title">Returns <a href="../interfaces/Auth0ContextInterface.html" class="tsd-signature-type" data-tsd-kind="Interface">Auth0ContextInterface</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type" data-tsd-kind="Type parameter">TUser</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources">
3838
<ul>
39-
<li>Defined in <a href="https://github.com/auth0/auth0-react/blob/3fc0faa/src/use-auth0.tsx#L27">src/use-auth0.tsx:27</a></li></ul></aside></li></ul></section></div>
39+
<li>Defined in <a href="https://github.com/auth0/auth0-react/blob/e55aa3a/src/use-auth0.tsx#L27">src/use-auth0.tsx:27</a></li></ul></aside></li></ul></section></div>
4040
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
4141
<div class="tsd-navigation settings">
4242
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">

0 commit comments

Comments
 (0)