Skip to content

Commit

Permalink
Prepare v9.12.0 (#1060)
Browse files Browse the repository at this point in the history
* Release v9.12.0

* Added documentation for maxAge param
  • Loading branch information
Steve Hobbs authored Dec 11, 2019
1 parent 57ea1c8 commit 101d692
Show file tree
Hide file tree
Showing 17 changed files with 517 additions and 223 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
## [v9.12.0](https://github.com/auth0/auth0.js/tree/v9.12.0) (2019-12-11)

[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.11.3...v9.12.0)

**Added**

- [CAUTH-239] Add getChallenge method [\#1057](https://github.com/auth0/auth0.js/pull/1057) ([jfromaniello](https://github.com/jfromaniello))

**Fixed**

- Fixed passwordless params priority [\#1058](https://github.com/auth0/auth0.js/pull/1058) ([stevehobbsdev](https://github.com/stevehobbsdev))
- Bugfix for WebExtension [\#1054](https://github.com/auth0/auth0.js/pull/1054) ([STK913](https://github.com/STK913))
- Readme develop [\#1043](https://github.com/auth0/auth0.js/pull/1043) ([jsoref](https://github.com/jsoref))
- Fixed typo [\#1039](https://github.com/auth0/auth0.js/pull/1039) ([Nyholm](https://github.com/Nyholm))

**Security**

- [SDK-974] Improved OIDC compliance [\#1059](https://github.com/auth0/auth0.js/pull/1059) ([stevehobbsdev](https://github.com/stevehobbsdev))

## [v9.11.3](https://github.com/auth0/auth0.js/tree/v9.11.3) (2019-07-23)

**Fixed**
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ From CDN:

```html
<!-- Latest patch release -->
<script src="https://cdn.auth0.com/js/auth0/9.11.3/auth0.min.js"></script>
<script src="https://cdn.auth0.com/js/auth0/9.12.0/auth0.min.js"></script>
```

From [npm](https://npmjs.org):
Expand Down Expand Up @@ -65,6 +65,7 @@ Parameters:
- **responseType {OPTIONAL, string}**: Response type for all authentication requests. It can be any space separated list of the values `code`, `token`, `id_token`. **If you don't provide a global `responseType`, you will have to provide a `responseType` for each method that you use**.
- **responseMode {OPTIONAL, string}**: The default responseMode used, defaults to `'fragment'`. The `parseHash` method can be used to parse authentication responses using fragment response mode. Supported values are `query`, `fragment` and `form_post`. The `query` value is only supported when `responseType` is `code`.
- **\_disableDeprecationWarnings {OPTIONAL, boolean}**: Indicates if deprecation warnings should be output to the browser console, defaults to `false`.
- **maxAge {OPTIONAL, number}**: Used during token validation. Specifies the maximum elapsed time in seconds since the last time the user was actively authenticated by the authorization server. If the elapsed time is greater than this value, the token is considered invalid and the user must be re-authenticated.

### API

Expand Down Expand Up @@ -181,10 +182,10 @@ var auth0 = new auth0.Management({

### API

- **getUser(userId, cb)**: Returns the user profile. [https://auth0.com/docs/api/management/v2#!/Users/get\_users\_by\_id](https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id)
- **patchUserMetadata(userId, userMetadata, cb)**: Updates the user metadata. It will patch the user metadata with the attributes sent. [https://auth0.com/docs/api/management/v2#!/Users/patch\_users\_by\_id](https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id)
- **patchUserAttributes(userId, user, cb)**: Updates the user attributes. It will patch the root attributes that the server allows it. To check what attributes can be patched, go to [https://auth0.com/docs/api/management/v2#!/Users/patch\_users\_by\_id](https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id)
- **linkUser(userId, secondaryUserToken, cb)**: Link two users. [https://auth0.com/docs/api/management/v2#!/Users/post\_identities](https://auth0.com/docs/api/management/v2#!/Users/post_identities)
- **getUser(userId, cb)**: Returns the user profile. [https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id](https://auth0.com/docs/api/management/v2#!/Users/get_users_by_id)
- **patchUserMetadata(userId, userMetadata, cb)**: Updates the user metadata. It will patch the user metadata with the attributes sent. [https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id](https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id)
- **patchUserAttributes(userId, user, cb)**: Updates the user attributes. It will patch the root attributes that the server allows it. To check what attributes can be patched, go to [https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id](https://auth0.com/docs/api/management/v2#!/Users/patch_users_by_id)
- **linkUser(userId, secondaryUserToken, cb)**: Link two users. [https://auth0.com/docs/api/management/v2#!/Users/post_identities](https://auth0.com/docs/api/management/v2#!/Users/post_identities)

## Documentation

Expand Down
10 changes: 8 additions & 2 deletions docs/Authentication.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@
><a href="global.html#delegation">delegation</a></span
>
</li>
<li class="nav-item">
<span class="nav-item-type type-function">F</span
><span class="nav-item-name"
><a href="global.html#getChallenge">getChallenge</a></span
>
</li>
<li class="nav-item">
<span class="nav-item-type type-function">F</span
><span class="nav-item-name"
Expand Down Expand Up @@ -488,8 +494,8 @@ <h5>Parameters:</h5>

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on
Tue Jul 23 2019 10:46:01 GMT-0300 (Brasilia Standard Time) using the
Minami theme.
Wed Dec 11 2019 10:33:27 GMT+0000 (Greenwich Mean Time) using the Minami
theme.
</footer>

<script>
Expand Down
10 changes: 8 additions & 2 deletions docs/Management.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@
><a href="global.html#delegation">delegation</a></span
>
</li>
<li class="nav-item">
<span class="nav-item-type type-function">F</span
><span class="nav-item-name"
><a href="global.html#getChallenge">getChallenge</a></span
>
</li>
<li class="nav-item">
<span class="nav-item-type type-function">F</span
><span class="nav-item-name"
Expand Down Expand Up @@ -362,8 +368,8 @@ <h5>Parameters:</h5>

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on
Tue Jul 23 2019 10:46:01 GMT-0300 (Brasilia Standard Time) using the
Minami theme.
Wed Dec 11 2019 10:33:27 GMT+0000 (Greenwich Mean Time) using the Minami
theme.
</footer>

<script>
Expand Down
12 changes: 9 additions & 3 deletions docs/WebAuth.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@
><a href="global.html#delegation">delegation</a></span
>
</li>
<li class="nav-item">
<span class="nav-item-type type-function">F</span
><span class="nav-item-name"
><a href="global.html#getChallenge">getChallenge</a></span
>
</li>
<li class="nav-item">
<span class="nav-item-type type-function">F</span
><span class="nav-item-name"
Expand Down Expand Up @@ -276,7 +282,7 @@ <h4 class="name" id="WebAuth">
<ul class="dummy">
<li>
<a href="web-auth_index.js.html">web-auth/index.js</a>,
<a href="web-auth_index.js.html#line35">line 35</a>
<a href="web-auth_index.js.html#line39">line 39</a>
</li>
</ul>
</dd>
Expand Down Expand Up @@ -525,8 +531,8 @@ <h5>Parameters:</h5>

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on
Tue Jul 23 2019 10:46:01 GMT-0300 (Brasilia Standard Time) using the
Minami theme.
Wed Dec 11 2019 10:33:27 GMT+0000 (Greenwich Mean Time) using the Minami
theme.
</footer>

<script>
Expand Down
11 changes: 9 additions & 2 deletions docs/authentication_db-connection.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@
><a href="global.html#delegation">delegation</a></span
>
</li>
<li class="nav-item">
<span class="nav-item-type type-function">F</span
><span class="nav-item-name"
><a href="global.html#getChallenge">getChallenge</a></span
>
</li>
<li class="nav-item">
<span class="nav-item-type type-function">F</span
><span class="nav-item-name"
Expand Down Expand Up @@ -279,6 +285,7 @@ <h1 class="page-title">authentication/db-connection.js</h1>
* @param {Object} options
* @param {String} options.email user email address
* @param {String} options.password user password
* @param {String} [options.username] user desired username. Required if you use a database connection and you have enabled `Requires Username`
* @param {String} options.connection name of the connection where the user will be created
* @param {Object} [options.userMetadata] additional signup attributes used for creating the user. Will be stored in `user_metadata`
* @param {signUpCallback} cb
Expand Down Expand Up @@ -377,8 +384,8 @@ <h1 class="page-title">authentication/db-connection.js</h1>

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on
Tue Jul 23 2019 10:46:01 GMT-0300 (Brasilia Standard Time) using the
Minami theme.
Wed Dec 11 2019 10:33:27 GMT+0000 (Greenwich Mean Time) using the Minami
theme.
</footer>

<script>
Expand Down
33 changes: 31 additions & 2 deletions docs/authentication_index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@
><a href="global.html#delegation">delegation</a></span
>
</li>
<li class="nav-item">
<span class="nav-item-type type-function">F</span
><span class="nav-item-name"
><a href="global.html#getChallenge">getChallenge</a></span
>
</li>
<li class="nav-item">
<span class="nav-item-type type-function">F</span
><span class="nav-item-name"
Expand Down Expand Up @@ -516,6 +522,7 @@ <h1 class="page-title">authentication/index.js</h1>
* @param {Number} [result.expiresIn] number of seconds until the access token expires
* @param {String} [result.idToken] token that identifies the user
* @param {String} [result.refreshToken] token that can be used to get new access tokens from Auth0. Note that not all Auth0 Applications can request them or the resource server might not allow them.
* @param {Object} [result.appState] values that you receive back on the authentication response
*/

/**
Expand Down Expand Up @@ -800,6 +807,28 @@ <h1 class="page-title">authentication/index.js</h1>
.end(responseHandler(cb, { ignoreCasing: true }));
};

/**
* Makes a call to the `/usernamepassword/challenge` endpoint
* and returns the challenge (captcha) if necessary.
*
* @method getChallenge
* @param {callback} cb
*/
Authentication.prototype.getChallenge = function(cb) {
assert.check(cb, { type: 'function', message: 'cb parameter is not valid' });

if (!this.baseOptions.state) {
return cb();
}

var url = urljoin(this.baseOptions.rootUrl, 'usernamepassword', 'challenge');

return this.request
.post(url)
.send({ state: this.baseOptions.state })
.end(responseHandler(cb, { ignoreCasing: true }));
};

/**
* @callback delegationCallback
* @param {Error} [err] error returned by Auth0 with the reason why the delegation failed
Expand Down Expand Up @@ -874,8 +903,8 @@ <h1 class="page-title">authentication/index.js</h1>

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a> on
Tue Jul 23 2019 10:46:01 GMT-0300 (Brasilia Standard Time) using the
Minami theme.
Wed Dec 11 2019 10:33:27 GMT+0000 (Greenwich Mean Time) using the Minami
theme.
</footer>

<script>
Expand Down
Loading

0 comments on commit 101d692

Please sign in to comment.