Skip to content

Commit

Permalink
Release v2.2.2 (#639)
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikprijck committed Oct 31, 2023
1 parent 11e6636 commit 2d84fc5
Show file tree
Hide file tree
Showing 20 changed files with 99 additions and 91 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Change Log

## [v2.2.2](https://github.com/auth0/auth0-react/tree/v2.2.2) (2023-10-31)
[Full Changelog](https://github.com/auth0/auth0-react/compare/v2.2.1...v2.2.2)

**Fixed**
- Export all errors from SPA-JS [\#637](https://github.com/auth0/auth0-react/pull/637) ([frederikprijck](https://github.com/frederikprijck))

**Changed**
- Make OAuthError extend GenericError [\#638](https://github.com/auth0/auth0-react/pull/638) ([frederikprijck](https://github.com/frederikprijck))

## [v2.2.1](https://github.com/auth0/auth0-react/tree/v2.2.1) (2023-08-22)
[Full Changelog](https://github.com/auth0/auth0-react/compare/v2.2.0...v2.2.1)

Expand Down
32 changes: 16 additions & 16 deletions docs/assets/highlight.css
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
:root {
--light-hl-0: #000000;
--dark-hl-0: #D4D4D4;
--light-hl-1: #A31515;
--dark-hl-1: #CE9178;
--light-hl-2: #008000;
--dark-hl-2: #6A9955;
--light-hl-3: #AF00DB;
--dark-hl-3: #C586C0;
--light-hl-4: #001080;
--dark-hl-4: #9CDCFE;
--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-0: #795E26;
--dark-hl-0: #DCDCAA;
--light-hl-1: #000000;
--dark-hl-1: #D4D4D4;
--light-hl-2: #A31515;
--dark-hl-2: #CE9178;
--light-hl-3: #008000;
--dark-hl-3: #6A9955;
--light-hl-4: #AF00DB;
--dark-hl-4: #C586C0;
--light-hl-5: #001080;
--dark-hl-5: #9CDCFE;
--light-hl-6: #0000FF;
--dark-hl-6: #569CD6;
--light-hl-7: #0070C1;
--dark-hl-7: #4FC1FF;
--light-hl-8: #800000;
--dark-hl-8: #808080;
--light-hl-9: #267F99;
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/main.js

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions docs/assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -483,10 +483,9 @@ blockquote {
.has-menu .col-menu {
visibility: visible;
transform: translate(0, 0);
display: grid;
align-items: center;
grid-template-rows: auto 1fr;
grid-gap: 1.5rem;
display: flex;
flex-direction: column;
gap: 1.5rem;
max-height: 100vh;
padding: 1rem 2rem;
}
Expand Down Expand Up @@ -911,7 +910,7 @@ a.tsd-index-link {
margin-right: 0.8rem;
}

@media (min-width: 1024px) {
@media (min-width: 1025px) {
.col-content {
margin: 2rem auto;
}
Expand Down
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/3fc0faa/src/errors.tsx#L7">src/errors.tsx:7</a></li></ul></aside>
<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>
<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/3fc0faa/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/e55aa3a/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/3fc0faa/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/e55aa3a/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/3fc0faa/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/e55aa3a/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-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>
<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>
</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/3fc0faa/src/auth0-provider.tsx#L135">src/auth0-provider.tsx:135</a></li></ul></aside></li></ul></section></div>
<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>
<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-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>
<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>
</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/3fc0faa/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/e55aa3a/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
Loading

0 comments on commit 2d84fc5

Please sign in to comment.