Skip to content

Commit 8ea61ce

Browse files
Release v2.0.1 (auth0#515)
1 parent a1bb92c commit 8ea61ce

19 files changed

+102
-81
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Change Log
22

3+
## [v2.0.1](https://github.com/auth0/auth0-react/tree/v2.0.1) (2023-02-22)
4+
[Full Changelog](https://github.com/auth0/auth0-react/compare/v2.0.0...v2.0.1)
5+
6+
**Fixed**
7+
- Support redirectUri again in a deprecated way [\#507](https://github.com/auth0/auth0-react/pull/507) ([frederikprijck](https://github.com/frederikprijck))
8+
39
## [v2.0.0](https://github.com/auth0/auth0-react/tree/v2.0.0) (2023-01-19)
410

511
Auth0-React v2 includes many significant changes compared to v1:

docs/assets/highlight.css

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,26 @@
99
--dark-hl-3: #C586C0;
1010
--light-hl-4: #001080;
1111
--dark-hl-4: #9CDCFE;
12-
--light-hl-5: #795E26;
13-
--dark-hl-5: #DCDCAA;
14-
--light-hl-6: #800000;
15-
--dark-hl-6: #808080;
16-
--light-hl-7: #267F99;
17-
--dark-hl-7: #4EC9B0;
18-
--light-hl-8: #E50000;
19-
--dark-hl-8: #9CDCFE;
20-
--light-hl-9: #0000FF;
21-
--dark-hl-9: #569CD6;
22-
--light-hl-10: #000000FF;
23-
--dark-hl-10: #D4D4D4;
24-
--light-hl-11: #0070C1;
25-
--dark-hl-11: #4FC1FF;
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;
18+
--light-hl-8: #800000;
19+
--dark-hl-8: #808080;
20+
--light-hl-9: #267F99;
21+
--dark-hl-9: #4EC9B0;
22+
--light-hl-10: #E50000;
23+
--dark-hl-10: #9CDCFE;
24+
--light-hl-11: #000000FF;
25+
--dark-hl-11: #D4D4D4;
2626
--light-hl-12: #800000;
2727
--dark-hl-12: #569CD6;
2828
--light-hl-13: #098658;
2929
--dark-hl-13: #B5CEA8;
30+
--light-hl-14: #CD3131;
31+
--dark-hl-14: #F44747;
3032
--light-code-background: #FFFFFF;
3133
--dark-code-background: #1E1E1E;
3234
}
@@ -46,6 +48,7 @@
4648
--hl-11: var(--light-hl-11);
4749
--hl-12: var(--light-hl-12);
4850
--hl-13: var(--light-hl-13);
51+
--hl-14: var(--light-hl-14);
4952
--code-background: var(--light-code-background);
5053
} }
5154

@@ -64,6 +67,7 @@
6467
--hl-11: var(--dark-hl-11);
6568
--hl-12: var(--dark-hl-12);
6669
--hl-13: var(--dark-hl-13);
70+
--hl-14: var(--dark-hl-14);
6771
--code-background: var(--dark-code-background);
6872
} }
6973

@@ -82,6 +86,7 @@
8286
--hl-11: var(--light-hl-11);
8387
--hl-12: var(--light-hl-12);
8488
--hl-13: var(--light-hl-13);
89+
--hl-14: var(--light-hl-14);
8590
--code-background: var(--light-code-background);
8691
}
8792

@@ -100,6 +105,7 @@
100105
--hl-11: var(--dark-hl-11);
101106
--hl-12: var(--dark-hl-12);
102107
--hl-13: var(--dark-hl-13);
108+
--hl-14: var(--dark-hl-14);
103109
--code-background: var(--dark-code-background);
104110
}
105111

@@ -117,4 +123,5 @@
117123
.hl-11 { color: var(--hl-11); }
118124
.hl-12 { color: var(--hl-12); }
119125
.hl-13 { color: var(--hl-13); }
126+
.hl-14 { color: var(--hl-14); }
120127
pre, code { background: var(--code-background); }

docs/classes/OAuthError.html

Lines changed: 4 additions & 4 deletions
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/501aca8/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/a1bb92c/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/501aca8/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/a1bb92c/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/501aca8/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/a1bb92c/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/501aca8/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/a1bb92c/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

Lines changed: 2 additions & 2 deletions
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-6">&lt;</span><span class="hl-7">Auth0Provider</span><br/><span class="hl-0"> </span><span class="hl-8">domain</span><span class="hl-0">=</span><span class="hl-9">{</span><span class="hl-4">domain</span><span class="hl-9">}</span><br/><span class="hl-0"> </span><span class="hl-8">clientId</span><span class="hl-0">=</span><span class="hl-9">{</span><span class="hl-4">clientId</span><span class="hl-9">}</span><br/><span class="hl-0"> </span><span class="hl-8">redirectUri</span><span class="hl-0">=</span><span class="hl-9">{</span><span class="hl-4">window</span><span class="hl-10">.</span><span class="hl-4">location</span><span class="hl-10">.</span><span class="hl-4">origin</span><span class="hl-9">}</span><span class="hl-6">&gt;</span><br/><span class="hl-0"> </span><span class="hl-6">&lt;</span><span class="hl-7">MyApp</span><span class="hl-0"> </span><span class="hl-6">/&gt;</span><br/><span class="hl-6">&lt;/</span><span class="hl-7">Auth0Provider</span><span class="hl-6">&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-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>
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/501aca8/src/auth0-provider.tsx#L128">src/auth0-provider.tsx:128</a></li></ul></aside></li></ul></section></div>
33+
<li>Defined in <a href="https://github.com/auth0/auth0-react/blob/a1bb92c/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

Lines changed: 2 additions & 2 deletions
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-9">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-11">error</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-11">isAuthenticated</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-11">isLoading</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-11">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-11">getAccessTokenSilently</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-11">getAccessTokenWithPopup</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-11">getIdTokenClaims</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-11">loginWithRedirect</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-11">loginWithPopup</span><span class="hl-0">,</span><br/><span class="hl-0"> </span><span class="hl-11">logout</span><span class="hl-0">,</span><br/><span class="hl-0">} = </span><span class="hl-5">useAuth0</span><span class="hl-0">&lt;</span><span class="hl-7">TUser</span><span class="hl-0">&gt;();</span>
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>
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/501aca8/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/a1bb92c/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)