Skip to content

Commit

Permalink
Release v2.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lbalmaceda committed Mar 26, 2021
1 parent 3fad40e commit 60d923a
Show file tree
Hide file tree
Showing 14 changed files with 183 additions and 37 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Change Log

## [v2.8.0](https://github.com/auth0/react-native-auth0/tree/v2.8.0) (2021-03-26)

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

**Added**

- Add support for Organizations [SDK-2398][\#361](https://github.com/auth0/react-native-auth0/pull/361) ([lbalmaceda](https://github.com/lbalmaceda))

## [v2.7.0](https://github.com/auth0/react-native-auth0/tree/v2.7.0) (2021-01-05)

[Full Changelog](https://github.com/auth0/react-native-auth0/compare/v2.6.0...v2.7.0)
Expand Down
6 changes: 3 additions & 3 deletions docs/Auth.html
Original file line number Diff line number Diff line change
Expand Up @@ -2067,9 +2067,9 @@ <h5>Returns:</h5>
<br class="clear" />

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on
Tue Jan 05 2021 17:43:27 GMT-0300 (Argentina Standard Time) using the
Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on
Fri Mar 26 2021 16:14:59 GMT+0100 (Central European Standard Time) using
the Minami theme.
</footer>

<script>
Expand Down
6 changes: 3 additions & 3 deletions docs/Auth0.html
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@ <h3 class="subsection-title">Classes</h3>
<br class="clear" />

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on
Tue Jan 05 2021 17:43:27 GMT-0300 (Argentina Standard Time) using the
Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on
Fri Mar 26 2021 16:14:59 GMT+0100 (Central European Standard Time) using
the Minami theme.
</footer>

<script>
Expand Down
6 changes: 3 additions & 3 deletions docs/Auth0.module.exports.html
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,9 @@ <h5>Parameters:</h5>
<br class="clear" />

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on
Tue Jan 05 2021 17:43:27 GMT-0300 (Argentina Standard Time) using the
Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on
Fri Mar 26 2021 16:14:59 GMT+0100 (Central European Standard Time) using
the Minami theme.
</footer>

<script>
Expand Down
6 changes: 3 additions & 3 deletions docs/Users.html
Original file line number Diff line number Diff line change
Expand Up @@ -462,9 +462,9 @@ <h5>Returns:</h5>
<br class="clear" />

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on
Tue Jan 05 2021 17:43:27 GMT-0300 (Argentina Standard Time) using the
Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on
Fri Mar 26 2021 16:14:59 GMT+0100 (Central European Standard Time) using
the Minami theme.
</footer>

<script>
Expand Down
42 changes: 37 additions & 5 deletions docs/WebAuth.html
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ <h4 class="name" id=".authorize">
<ul class="dummy">
<li>
<a href="src_webauth_index.js.html">src/webauth/index.js</a
>, <a href="src_webauth_index.js.html#line66">line 66</a>
>, <a href="src_webauth_index.js.html#line68">line 68</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -426,6 +426,38 @@ <h5>Parameters:</h5>
</p>
</td>
</tr>

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

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

<td class="attributes">&lt;optional><br /></td>

<td class="description last">
<p>the ID of the organization to join</p>
</td>
</tr>

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

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

<td class="attributes">&lt;optional><br /></td>

<td class="description last">
<p>
the invitation URL to join an organization. Takes
precedence over the &quot;organization&quot;
parameter.
</p>
</td>
</tr>
</tbody>
</table>
</td>
Expand Down Expand Up @@ -549,7 +581,7 @@ <h4 class="name" id=".clearSession">
<ul class="dummy">
<li>
<a href="src_webauth_index.js.html">src/webauth/index.js</a
>, <a href="src_webauth_index.js.html#line136">line 136</a>
>, <a href="src_webauth_index.js.html#line155">line 155</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -658,9 +690,9 @@ <h5>Returns:</h5>
<br class="clear" />

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on
Tue Jan 05 2021 17:43:27 GMT-0300 (Argentina Standard Time) using the
Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on
Fri Mar 26 2021 16:14:59 GMT+0100 (Central European Standard Time) using
the Minami theme.
</footer>

<script>
Expand Down
6 changes: 3 additions & 3 deletions docs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,9 @@ <h5>Returns:</h5>
<br class="clear" />

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on
Tue Jan 05 2021 17:43:27 GMT-0300 (Argentina Standard Time) using the
Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on
Fri Mar 26 2021 16:14:59 GMT+0100 (Central European Standard Time) using
the Minami theme.
</footer>

<script>
Expand Down
93 changes: 90 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,93 @@ <h3>Get full user profile</h3>
>documentation</a
>
</p>
<h3>Organizations (Closed Beta)</h3>
<p>
Organizations is a set of features that provide better support for
developers who build and maintain SaaS and Business-to-Business
(B2B) applications.
</p>
<p>Using Organizations, you can:</p>
<ul>
<li>
Represent teams, business customers, partner companies, or any
logical grouping of users that should have different ways of
accessing your applications, as organizations.
</li>
<li>
Manage their membership in a variety of ways, including user
invitation.
</li>
<li>
Configure branded, federated login flows for each organization.
</li>
<li>
Implement role-based access control, such that users can have
different roles when authenticating in the context of different
organizations.
</li>
<li>
Build administration capabilities into your products, using
Organizations APIs, so that those businesses can manage their own
organizations.
</li>
</ul>
<p>
Note that Organizations is currently only available to customers on
our Enterprise and Startup subscription plans.
</p>
<h4>Log in to an organization</h4>
<pre class="prettyprint source lang-js"><code>auth0.webAuth
.authorize({organization: 'organization-id'})
.then(credentials => console.log(credentials))
.catch(error => console.log(error));
</code></pre>
<h4>Accept user invitations</h4>
<p>
Users can be invited to your organization via a link. Tapping on the
invitation link should open your app. Since invitations links are
<code>https</code> only, is recommended that your Android app
supports
<a href="https://developer.android.com/training/app-links"
>Android App Links</a
>. In the case of iOS, your app must support
<a
href="https://developer.apple.com/documentation/xcode/allowing_apps_and_websites_to_link_to_your_content/supporting_universal_links_in_your_app"
>Universal Links</a
>.
</p>
<p>
In
<a
href="https://auth0.com/docs/applications/enable-android-app-links-support"
>Enable Android App Links Support</a
>
and
<a
href="https://auth0.com/docs/enable-universal-links-support-in-apple-xcode"
>Enable Universal Links Support</a
>, you will find how to make the Auth0 server publish the Digital
Asset Links file required by your applications.
</p>
<p>
When your app gets opened by an invitation link, grab the invitation
URL and pass it as a parameter to the webauth call. Use the
<a href="https://reactnative.dev/docs/linking">Linking Module</a>
method called <code>getInitialUrl()</code> to obtain the URL that
launched your application.
</p>
<pre class="prettyprint source lang-js"><code>auth0.webAuth
.authorize({
invitationUrl:
'https://myapp.com/login?invitation=inv123&organization=org123',
})
.then(credentials => console.log(credentials))
.catch(error => console.log(error));
</code></pre>
<p>
If the URL doesn't contain the expected values, an error will be
raised through the provided callback.
</p>
<h3>Bot Protection</h3>
<p>
If you are using the
Expand Down Expand Up @@ -882,9 +969,9 @@ <h2>License</h2>
<br class="clear" />

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on
Tue Jan 05 2021 17:43:27 GMT-0300 (Argentina Standard Time) using the
Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on
Fri Mar 26 2021 16:14:59 GMT+0100 (Central European Standard Time) using
the Minami theme.
</footer>

<script>
Expand Down
6 changes: 3 additions & 3 deletions docs/index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -229,9 +229,9 @@ <h1 class="page-title">index.js</h1>
<br class="clear" />

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on
Tue Jan 05 2021 17:43:27 GMT-0300 (Argentina Standard Time) using the
Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on
Fri Mar 26 2021 16:14:59 GMT+0100 (Central European Standard Time) using
the Minami theme.
</footer>

<script>
Expand Down
6 changes: 3 additions & 3 deletions docs/src_auth_index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -697,9 +697,9 @@ <h1 class="page-title">src/auth/index.js</h1>
<br class="clear" />

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on
Tue Jan 05 2021 17:43:27 GMT-0300 (Argentina Standard Time) using the
Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on
Fri Mar 26 2021 16:14:58 GMT+0100 (Central European Standard Time) using
the Minami theme.
</footer>

<script>
Expand Down
6 changes: 3 additions & 3 deletions docs/src_management_users.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,9 @@ <h1 class="page-title">src/management/users.js</h1>
<br class="clear" />

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on
Tue Jan 05 2021 17:43:27 GMT-0300 (Argentina Standard Time) using the
Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on
Fri Mar 26 2021 16:14:59 GMT+0100 (Central European Standard Time) using
the Minami theme.
</footer>

<script>
Expand Down
25 changes: 22 additions & 3 deletions docs/src_webauth_index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,8 @@ <h1 class="page-title">src/webauth/index.js</h1>
* @param {String} [parameters.scope] Scopes requested for the issued tokens. e.g. `openid profile`
* @param {String} [parameters.connection] The name of the identity provider to use, e.g. "google-oauth2" or "facebook". When not set, it will display Auth0's Universal Login Page.
* @param {Number} [parameters.max_age] The allowable elapsed time in seconds since the last time the user was authenticated (optional).
* @param {String} [parameters.organization] the ID of the organization to join
* @param {String} [parameters.invitationUrl] the invitation URL to join an organization. Takes precedence over the "organization" parameter.
* @param {Object} options Other configuration options.
* @param {Number} [options.leeway] The amount of leeway, in seconds, to accommodate potential clock skew when validating an ID token's claims. Defaults to 60 seconds if not specified.
* @param {Boolean} [options.ephemeralSession] Disable Single-Sign-On (SSO). It only affects iOS with versions 13 and above.
Expand All @@ -255,6 +257,22 @@ <h1 class="page-title">src/webauth/index.js</h1>
return agent.newTransaction().then(({state, verifier, ...defaults}) => {
const redirectUri = callbackUri(domain, options.customScheme);
const expectedState = parameters.state || state;
if (parameters.invitationUrl) {
const urlQuery = url.parse(parameters.invitationUrl, true).query;
const {invitation, organization} = urlQuery;
if (!invitation || !organization) {
throw new AuthError({
json: {
error: 'a0.invalid_invitation_url',
error_description: `The invitation URL provided doesn't contain the 'organization' or 'invitation' values.`,
},
status: 0,
});
}
parameters.invitation = invitation;
parameters.organization = organization;
}

let query = {
...defaults,
clientId,
Expand Down Expand Up @@ -301,6 +319,7 @@ <h1 class="page-title">src/webauth/index.js</h1>
maxAge: parameters.max_age,
scope: parameters.scope,
leeway: options.leeway,
orgId: parameters.organization,
}).then(() => Promise.resolve(credentials));
});
});
Expand Down Expand Up @@ -337,9 +356,9 @@ <h1 class="page-title">src/webauth/index.js</h1>
<br class="clear" />

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on
Tue Jan 05 2021 17:43:27 GMT-0300 (Argentina Standard Time) using the
Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.4</a> on
Fri Mar 26 2021 16:14:59 GMT+0100 (Central European Standard Time) using
the Minami theme.
</footer>

<script>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-native-auth0",
"title": "React Native Auth0",
"version": "2.7.0",
"version": "2.8.0",
"description": "React Native toolkit for Auth0 API",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/networking/telemetry.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = {name: 'react-native-auth0', version: '2.7.0'};
module.exports = {name: 'react-native-auth0', version: '2.8.0'};

0 comments on commit 60d923a

Please sign in to comment.