Skip to content

Commit

Permalink
Release v2.0.1 (#515)
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikprijck committed Feb 22, 2023
1 parent a1bb92c commit 8ea61ce
Show file tree
Hide file tree
Showing 19 changed files with 102 additions and 81 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## [v2.0.1](https://github.com/auth0/auth0-react/tree/v2.0.1) (2023-02-22)
[Full Changelog](https://github.com/auth0/auth0-react/compare/v2.0.0...v2.0.1)

**Fixed**
- Support redirectUri again in a deprecated way [\#507](https://github.com/auth0/auth0-react/pull/507) ([frederikprijck](https://github.com/frederikprijck))

## [v2.0.0](https://github.com/auth0/auth0-react/tree/v2.0.0) (2023-01-19)

Auth0-React v2 includes many significant changes compared to v1:
Expand Down
35 changes: 21 additions & 14 deletions docs/assets/highlight.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,26 @@
--dark-hl-3: #C586C0;
--light-hl-4: #001080;
--dark-hl-4: #9CDCFE;
--light-hl-5: #795E26;
--dark-hl-5: #DCDCAA;
--light-hl-6: #800000;
--dark-hl-6: #808080;
--light-hl-7: #267F99;
--dark-hl-7: #4EC9B0;
--light-hl-8: #E50000;
--dark-hl-8: #9CDCFE;
--light-hl-9: #0000FF;
--dark-hl-9: #569CD6;
--light-hl-10: #000000FF;
--dark-hl-10: #D4D4D4;
--light-hl-11: #0070C1;
--dark-hl-11: #4FC1FF;
--light-hl-5: #0000FF;
--dark-hl-5: #569CD6;
--light-hl-6: #0070C1;
--dark-hl-6: #4FC1FF;
--light-hl-7: #795E26;
--dark-hl-7: #DCDCAA;
--light-hl-8: #800000;
--dark-hl-8: #808080;
--light-hl-9: #267F99;
--dark-hl-9: #4EC9B0;
--light-hl-10: #E50000;
--dark-hl-10: #9CDCFE;
--light-hl-11: #000000FF;
--dark-hl-11: #D4D4D4;
--light-hl-12: #800000;
--dark-hl-12: #569CD6;
--light-hl-13: #098658;
--dark-hl-13: #B5CEA8;
--light-hl-14: #CD3131;
--dark-hl-14: #F44747;
--light-code-background: #FFFFFF;
--dark-code-background: #1E1E1E;
}
Expand All @@ -46,6 +48,7 @@
--hl-11: var(--light-hl-11);
--hl-12: var(--light-hl-12);
--hl-13: var(--light-hl-13);
--hl-14: var(--light-hl-14);
--code-background: var(--light-code-background);
} }

Expand All @@ -64,6 +67,7 @@
--hl-11: var(--dark-hl-11);
--hl-12: var(--dark-hl-12);
--hl-13: var(--dark-hl-13);
--hl-14: var(--dark-hl-14);
--code-background: var(--dark-code-background);
} }

Expand All @@ -82,6 +86,7 @@
--hl-11: var(--light-hl-11);
--hl-12: var(--light-hl-12);
--hl-13: var(--light-hl-13);
--hl-14: var(--light-hl-14);
--code-background: var(--light-code-background);
}

Expand All @@ -100,6 +105,7 @@
--hl-11: var(--dark-hl-11);
--hl-12: var(--dark-hl-12);
--hl-13: var(--dark-hl-13);
--hl-14: var(--dark-hl-14);
--code-background: var(--dark-code-background);
}

Expand All @@ -117,4 +123,5 @@
.hl-11 { color: var(--hl-11); }
.hl-12 { color: var(--hl-12); }
.hl-13 { color: var(--hl-13); }
.hl-14 { color: var(--hl-14); }
pre, code { background: var(--code-background); }
8 changes: 4 additions & 4 deletions docs/classes/OAuthError.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ <h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">OAuthError</span></li></ul></li></ul></section><aside class="tsd-sources">
<ul>
<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>
<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>
<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">
Expand Down Expand Up @@ -68,19 +68,19 @@ <h5><code class="tsd-tag ts-flagOptional">Optional</code> error_description: <sp
<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">
<p>Overrides Error.constructor</p>
<ul>
<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>
<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>
<section class="tsd-panel-group tsd-member-group">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="error" class="tsd-anchor"></a>
<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>
<div class="tsd-signature">error<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
<ul>
<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>
<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>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class"><a id="error_description" class="tsd-anchor"></a>
<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>
<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">
<ul>
<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>
<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>
<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>
<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>
<div class="tsd-signature">message<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources">
Expand Down
4 changes: 2 additions & 2 deletions docs/functions/Auth0Provider.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h1>Function Auth0Provider</h1></div>
<ul class="tsd-signatures tsd-kind-function">
<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>
<li class="tsd-description">
<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>
<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>
</code></pre>
<p>Provides the Auth0Context to its child components.</p>
</div>
Expand All @@ -30,7 +30,7 @@ <h4 class="tsd-parameters-title">Parameters</h4>
<h5>opts: <a href="../interfaces/Auth0ProviderOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">Auth0ProviderOptions</a></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Element</span></h4><aside class="tsd-sources">
<ul>
<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>
<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>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
Expand Down
4 changes: 2 additions & 2 deletions docs/functions/useAuth0.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h1>Function useAuth0</h1></div>
<ul class="tsd-signatures tsd-kind-function">
<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>
<li class="tsd-description">
<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>
<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>
</code></pre>
<p>Use the <code>useAuth0</code> hook in your components to access the auth state and methods.</p>
<p>TUser is an optional type param to provide a type to the <code>user</code> field.</p>
Expand All @@ -36,7 +36,7 @@ <h4 class="tsd-parameters-title">Parameters</h4>
<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>
<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">
<ul>
<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>
<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>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
Expand Down

0 comments on commit 8ea61ce

Please sign in to comment.