Skip to content

Commit

Permalink
Release v2.17.0 (#588)
Browse files Browse the repository at this point in the history
  • Loading branch information
poovamraj authored Feb 1, 2023
1 parent da04cb0 commit a2330dd
Show file tree
Hide file tree
Showing 17 changed files with 136 additions and 56 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Change Log

## [v2.17.0](https://github.com/auth0/react-native-auth0/tree/v2.17.0) (2023-02-01)

[Full Changelog](https://github.com/auth0/react-native-auth0/compare/v2.16.0...v2.17.0)

**Added**

- Allow additional options for authorize and support custom LAPolicy [\#526](https://github.com/auth0/react-native-auth0/pull/526) ([chrismcleod](https://github.com/chrismcleod))
- Initialized flag on useAuth0 hook [\#561](https://github.com/auth0/react-native-auth0/pull/561) ([cranberyxl](https://github.com/cranberyxl))

**Fixed**

- Fixing `.hide()` on iOS [\#570](https://github.com/auth0/react-native-auth0/pull/570) ([stigi](https://github.com/stigi))

**Security**

- chore: Bump `yarn.lock` dependencies [\#580](https://github.com/auth0/react-native-auth0/pull/580) ([evansims](https://github.com/evansims))
- chore(deps): bump decode-uri-component from 0.2.0 to 0.2.2 [\#567](https://github.com/auth0/react-native-auth0/pull/567) ([dependabot[bot]](https://github.com/apps/dependabot))
- Security: Bump Dependencies [\#565](https://github.com/auth0/react-native-auth0/pull/565) ([evansims](https://github.com/evansims))

## [v2.16.0](https://github.com/auth0/react-native-auth0/tree/v2.16.0) (2022-11-16)

[Full Changelog](https://github.com/auth0/react-native-auth0/compare/v2.15.0...v2.16.0)
Expand Down
4 changes: 2 additions & 2 deletions docs/Auth.html
Original file line number Diff line number Diff line change
Expand Up @@ -2729,8 +2729,8 @@ <h5>Returns:</h5>

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on
Wed Nov 16 2022 17:11:26 GMT+0100 (Central European Standard Time) using
the Minami theme.
Wed Feb 01 2023 10:15:23 GMT+0530 (India Standard Time) using the Minami
theme.
</footer>

<script>
Expand Down
4 changes: 2 additions & 2 deletions docs/Auth0.html
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,8 @@ <h5>Returns:</h5>

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on
Wed Nov 16 2022 17:11:26 GMT+0100 (Central European Standard Time) using
the Minami theme.
Wed Feb 01 2023 10:15:23 GMT+0530 (India Standard Time) using the Minami
theme.
</footer>

<script>
Expand Down
47 changes: 32 additions & 15 deletions docs/CredentialsManager.html
Original file line number Diff line number Diff line change
Expand Up @@ -286,8 +286,8 @@ <h4 class="name" id="CredentialsManager">
<a href="credentials-manager_index.js.html"
>credentials-manager/index.js</a
>,
<a href="credentials-manager_index.js.html#line11"
>line 11</a
<a href="credentials-manager_index.js.html#line12"
>line 12</a
>
</li>
</ul>
Expand Down Expand Up @@ -362,8 +362,8 @@ <h4 class="name" id="clearCredentials">
<a href="credentials-manager_index.js.html"
>credentials-manager/index.js</a
>,
<a href="credentials-manager_index.js.html#line127"
>line 127</a
<a href="credentials-manager_index.js.html#line131"
>line 131</a
>
</li>
</ul>
Expand Down Expand Up @@ -391,8 +391,8 @@ <h4 class="name" id="getCredentials">
<a href="credentials-manager_index.js.html"
>credentials-manager/index.js</a
>,
<a href="credentials-manager_index.js.html#line61"
>line 61</a
<a href="credentials-manager_index.js.html#line62"
>line 62</a
>
</li>
</ul>
Expand Down Expand Up @@ -506,8 +506,8 @@ <h4 class="name" id="hasValidCredentials">
<a href="credentials-manager_index.js.html"
>credentials-manager/index.js</a
>,
<a href="credentials-manager_index.js.html#line119"
>line 119</a
<a href="credentials-manager_index.js.html#line123"
>line 123</a
>
</li>
</ul>
Expand Down Expand Up @@ -556,7 +556,8 @@ <h5>Parameters:</h5>
<h4 class="name" id="requireLocalAuthentication">
<span class="type-signature">(async) </span
>requireLocalAuthentication<span class="signature"
>(title, description, cancelTitle, fallbackTitle)</span
>(title, description, cancelTitle, fallbackTitle,
strategy)</span
><span class="type-signature"> &rarr; {Promise}</span>
</h4>

Expand All @@ -575,8 +576,8 @@ <h4 class="name" id="requireLocalAuthentication">
<a href="credentials-manager_index.js.html"
>credentials-manager/index.js</a
>,
<a href="credentials-manager_index.js.html#line88"
>line 88</a
<a href="credentials-manager_index.js.html#line90"
>line 90</a
>
</li>
</ul>
Expand Down Expand Up @@ -660,6 +661,22 @@ <h5>Parameters:</h5>
</p>
</td>
</tr>

<tr>
<td class="name"><code>strategy</code></td>

<td class="type">
<span class="param-type"><code>String</code></span>
</td>

<td class="description last">
<p>
iOS Only - optional - the evaluation policy to use when
accessing the credentials. Defaults to
LocalAuthenticationStrategy.deviceOwnerWithBiometrics.
</p>
</td>
</tr>
</tbody>
</table>

Expand Down Expand Up @@ -697,8 +714,8 @@ <h4 class="name" id="saveCredentials">
<a href="credentials-manager_index.js.html"
>credentials-manager/index.js</a
>,
<a href="credentials-manager_index.js.html#line29"
>line 29</a
<a href="credentials-manager_index.js.html#line30"
>line 30</a
>
</li>
</ul>
Expand Down Expand Up @@ -846,8 +863,8 @@ <h5>Returns:</h5>

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on
Wed Nov 16 2022 17:11:26 GMT+0100 (Central European Standard Time) using
the Minami theme.
Wed Feb 01 2023 10:15:23 GMT+0530 (India Standard Time) using the Minami
theme.
</footer>

<script>
Expand Down
4 changes: 2 additions & 2 deletions docs/Users.html
Original file line number Diff line number Diff line change
Expand Up @@ -535,8 +535,8 @@ <h5>Returns:</h5>

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on
Wed Nov 16 2022 17:11:26 GMT+0100 (Central European Standard Time) using
the Minami theme.
Wed Feb 01 2023 10:15:23 GMT+0530 (India Standard Time) using the Minami
theme.
</footer>

<script>
Expand Down
4 changes: 2 additions & 2 deletions docs/WebAuth.html
Original file line number Diff line number Diff line change
Expand Up @@ -835,8 +835,8 @@ <h5>Returns:</h5>

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on
Wed Nov 16 2022 17:11:26 GMT+0100 (Central European Standard Time) using
the Minami theme.
Wed Feb 01 2023 10:15:23 GMT+0530 (India Standard Time) using the Minami
theme.
</footer>

<script>
Expand Down
4 changes: 2 additions & 2 deletions docs/auth0.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ <h1 class="page-title">auth0.js</h1>

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on
Wed Nov 16 2022 17:11:26 GMT+0100 (Central European Standard Time) using
the Minami theme.
Wed Feb 01 2023 10:15:23 GMT+0530 (India Standard Time) using the Minami
theme.
</footer>

<script>
Expand Down
4 changes: 2 additions & 2 deletions docs/auth_index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -893,8 +893,8 @@ <h1 class="page-title">auth/index.js</h1>

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on
Wed Nov 16 2022 17:11:26 GMT+0100 (Central European Standard Time) using
the Minami theme.
Wed Feb 01 2023 10:15:23 GMT+0530 (India Standard Time) using the Minami
theme.
</footer>

<script>
Expand Down
8 changes: 6 additions & 2 deletions docs/credentials-manager_index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ <h1 class="page-title">credentials-manager/index.js</h1>
class="prettyprint source linenums"
><code>import {Platform, NativeModules} from 'react-native';
import CredentialsManagerError from './credentialsManagerError';
import LocalAuthenticationStrategy from './localAuthenticationStrategy';

class CredentialsManager {
/**
Expand Down Expand Up @@ -346,13 +347,15 @@ <h1 class="page-title">credentials-manager/index.js</h1>
* @param {String} description Android Only - optional - the text to use as description in the authentication screen. On some Android versions it might not be shown. Passing null will result in using the OS's default value.
* @param {String} cancelTitle iOS Only - optional - the cancel message to display on the local authentication prompt.
* @param {String} fallbackTitle iOS Only - optional - the fallback message to display on the local authentication prompt after a failed match.
* @param {String} strategy iOS Only - optional - the evaluation policy to use when accessing the credentials. Defaults to LocalAuthenticationStrategy.deviceOwnerWithBiometrics.
* @returns {Promise}
*/
async requireLocalAuthentication(
title,
description,
cancelTitle,
fallbackTitle,
strategy = LocalAuthenticationStrategy.deviceOwnerWithBiometrics,
) {
try {
await this._ensureCredentialManagerIsInitialized();
Expand All @@ -361,6 +364,7 @@ <h1 class="page-title">credentials-manager/index.js</h1>
title,
cancelTitle,
fallbackTitle,
strategy
);
} else {
await this.Auth0Module.enableLocalAuthentication(title, description);
Expand Down Expand Up @@ -414,8 +418,8 @@ <h1 class="page-title">credentials-manager/index.js</h1>

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on
Wed Nov 16 2022 17:11:26 GMT+0100 (Central European Standard Time) using
the Minami theme.
Wed Feb 01 2023 10:15:23 GMT+0530 (India Standard Time) using the Minami
theme.
</footer>

<script>
Expand Down
24 changes: 20 additions & 4 deletions docs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ <h4 class="name" id="Auth0Provider">
<li>
<a href="hooks_auth0-provider.js.html"
>hooks/auth0-provider.js</a
>, <a href="hooks_auth0-provider.js.html#line42">line 42</a>
>, <a href="hooks_auth0-provider.js.html#line43">line 43</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -370,7 +370,7 @@ <h4 class="name" id="useAuth0">
<ul class="dummy">
<li>
<a href="hooks_use-auth0.js.html">hooks/use-auth0.js</a>,
<a href="hooks_use-auth0.js.html#line31">line 31</a>
<a href="hooks_use-auth0.js.html#line33">line 33</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -406,6 +406,7 @@ <h5>Example</h5>
// State
error,
user,
isLoading,
// Methods
authorize,
clearSession,
Expand Down Expand Up @@ -464,6 +465,21 @@ <h5 class="subsection-title">Properties:</h5>
</td>
</tr>

<tr>
<td class="name"><code>isLoading</code></td>

<td class="type">
<span class="param-type"><code>boolean</code></span>
</td>

<td class="description last">
<p>
A flag that is true until the state knows that a user is
either logged in or not
</p>
</td>
</tr>

<tr>
<td class="name"><code>authorize</code></td>

Expand Down Expand Up @@ -582,8 +598,8 @@ <h5>Type:</h5>

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on
Wed Nov 16 2022 17:11:26 GMT+0100 (Central European Standard Time) using
the Minami theme.
Wed Feb 01 2023 10:15:23 GMT+0530 (India Standard Time) using the Minami
theme.
</footer>

<script>
Expand Down
16 changes: 10 additions & 6 deletions docs/hooks_auth0-provider.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ <h1 class="page-title">hooks/auth0-provider.js</h1>
const initialState = {
user: null,
error: null,
isLoading: true,
};

/**
Expand Down Expand Up @@ -311,10 +312,13 @@ <h1 class="page-title">hooks/auth0-provider.js</h1>
let user = null;

if (await client.credentialsManager.hasValidCredentials()) {
const credentials = await client.credentialsManager.getCredentials();

if (credentials) {
user = getIdTokenProfileClaims(credentials.idToken);
try {
const credentials = await client.credentialsManager.getCredentials();
if (credentials) {
user = getIdTokenProfileClaims(credentials.idToken);
}
} catch (error) {
dispatch({type: 'ERROR', error});
}
}

Expand Down Expand Up @@ -436,8 +440,8 @@ <h1 class="page-title">hooks/auth0-provider.js</h1>

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on
Wed Nov 16 2022 17:11:26 GMT+0100 (Central European Standard Time) using
the Minami theme.
Wed Feb 01 2023 10:15:23 GMT+0530 (India Standard Time) using the Minami
theme.
</footer>

<script>
Expand Down
6 changes: 4 additions & 2 deletions docs/hooks_use-auth0.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ <h1 class="page-title">hooks/use-auth0.js</h1>
* @typedef {Object} Auth0ContextInterface
* @property {Object} user The user profile as decoded from the ID token after authentication
* @property {Object} error An object representing the last exception
* @property {boolean} isLoading A flag that is true until the state knows that a user is either logged in or not
* @property {Function} authorize Authorize the user using Auth0 Universal Login. See {@link WebAuth#authorize}
* @property {Function} clearSession Clears the user's web session, credentials and logs them out. See {@link WebAuth#clearSession}.
* @property {Function} getCredentials Gets the user's credentials from the native credential store. See {@link CredentialsManager#getCredentials}
Expand All @@ -283,6 +284,7 @@ <h1 class="page-title">hooks/use-auth0.js</h1>
* // State
* error,
* user,
* isLoading,
* // Methods
* authorize,
* clearSession,
Expand All @@ -303,8 +305,8 @@ <h1 class="page-title">hooks/use-auth0.js</h1>

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on
Wed Nov 16 2022 17:11:26 GMT+0100 (Central European Standard Time) using
the Minami theme.
Wed Feb 01 2023 10:15:23 GMT+0530 (India Standard Time) using the Minami
theme.
</footer>

<script>
Expand Down
Loading

0 comments on commit a2330dd

Please sign in to comment.