Skip to content

Commit

Permalink
Release v9.20.0 (#1280)
Browse files Browse the repository at this point in the history
  • Loading branch information
stevehobbsdev authored Dec 13, 2022
1 parent 05dbf4a commit a05f99e
Show file tree
Hide file tree
Showing 26 changed files with 972 additions and 52 deletions.
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,61 @@
# Change Log

## [v9.20.0](https://github.com/auth0/auth0.js/tree/v9.20.0) (2022-12-13)

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

**Added**

- Support Captcha challenge for passwordless login [\#1277](https://github.com/auth0/auth0.js/pull/1277) ([DominickBattistini](https://github.com/DominickBattistini))

## [v9.19.2](https://github.com/auth0/auth0.js/tree/v9.19.2) (2022-11-04)

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

**Changed**

- Regenerate API docs using new readme [\#1271](https://github.com/auth0/auth0.js/pull/1271) ([frederikprijck](https://github.com/frederikprijck))
- Update readme based on the internal redesign [\#1269](https://github.com/auth0/auth0.js/pull/1269) ([frederikprijck](https://github.com/frederikprijck))

**Fixed**

- support timeout option in Popup.loginWithCredentials [\#1273](https://github.com/auth0/auth0.js/pull/1273) ([stevehobbsdev](https://github.com/stevehobbsdev))

## [v9.19.1](https://github.com/auth0/auth0.js/tree/v9.19.1) (2022-09-09)

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

**Changed**

- Clean up old/missing library migration links [\#1256](https://github.com/auth0/auth0.js/pull/1256) ([stevehobbsdev](https://github.com/stevehobbsdev))
- Clarify usage of legacySameSiteCookie in readme [\#1255](https://github.com/auth0/auth0.js/pull/1255) ([stevehobbsdev](https://github.com/stevehobbsdev))

**Security**

- Security: Bump dev dependencies and update lockfile [\#1244](https://github.com/auth0/auth0.js/pull/1244) ([evansims](https://github.com/evansims))

## [v9.19.0](https://github.com/auth0/auth0.js/tree/v9.19.0) (2022-01-25)

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

**Added**

- Add compatibility cookie for SameSite, with option to turn it off [\#1232](https://github.com/auth0/auth0.js/pull/1232) ([stevehobbsdev](https://github.com/stevehobbsdev))

## [v9.18.1](https://github.com/auth0/auth0.js/tree/v9.18.1) (2022-01-14)

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

**Fixed**

- Set sameSite to 'none' for cookies when using HTTPS [\#1229](https://github.com/auth0/auth0.js/pull/1229) ([stevehobbsdev](https://github.com/stevehobbsdev))

## [v9.18.0](https://github.com/auth0/auth0.js/tree/v9.18.0) (2021-11-09)

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

**Added**

- Make state expiration configurable [\#1217](https://github.com/auth0/auth0.js/pull/1217) ([aedelbro](https://github.com/aedelbro))

[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.16.4...v9.17.0)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ From CDN:

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

From [npm](https://npmjs.org):
Expand Down
111 changes: 107 additions & 4 deletions dist/auth0.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* auth0-js v9.19.2
* auth0-js v9.20.0
* Author: Auth0
* Date: 2022-11-04
* Date: 2022-12-13
* License: MIT
*/

Expand Down Expand Up @@ -4746,7 +4746,7 @@
decode: decode$1
};

var version = { raw: '9.19.2' };
var version = { raw: '9.20.0' };

var toString = Object.prototype.toString;

Expand Down Expand Up @@ -7601,7 +7601,66 @@
};
}

var captcha = { render: render };
/**
*
* Renders the passwordless captcha challenge in the provided element.
*
* @param {Authentication} auth0Client The challenge response from the authentication server
* @param {HTMLElement} element The element where the captcha needs to be rendered
* @param {Object} options The configuration options for the captcha
* @param {Object} [options.templates] An object containaing templates for each captcha provider
* @param {Function} [options.templates.auth0] template function receiving the challenge and returning an string
* @param {Function} [options.templates.recaptcha_v2] template function receiving the challenge and returning an string
* @param {Function} [options.templates.recaptcha_enterprise] template function receiving the challenge and returning an string
* @param {String} [options.lang=en] the ISO code of the language for recaptcha*
* @param {Function} [callback] an optional callback function
* @ignore
*/
function renderPasswordless(auth0Client, element, options, callback) {
options = objectHelper.merge(defaults$2).with(options || {});

function load(done) {
done = done || noop;
auth0Client.passwordless.getChallenge(function(err, challenge) {
if (err) {
element.innerHTML = options.templates.error(err);
return done(err);
}
if (!challenge.required) {
element.style.display = 'none';
element.innerHTML = '';
return;
}
element.style.display = '';
if (challenge.provider === AUTH0_PROVIDER) {
handleAuth0Provider(element, options, challenge, load);
} else if (
challenge.provider === RECAPTCHA_V2_PROVIDER ||
challenge.provider === RECAPTCHA_ENTERPRISE_PROVIDER
) {
handleRecaptchaProvider(element, options, challenge);
}
done();
});
}

function getValue() {
var captchaInput = element.querySelector('input[name="captcha"]');
if (!captchaInput) {
return;
}
return captchaInput.value;
}

load(callback);

return {
reload: load,
getValue: getValue,
};
}

var captcha = { render: render, renderPasswordless: renderPasswordless };

function defaultClock() {
return new Date();
Expand Down Expand Up @@ -8313,6 +8372,7 @@
* @param {String} options.send what will be sent via email which could be `link` or `code`. For SMS `code` is the only one valid
* @param {String} [options.phoneNumber] phone number where to send the `code`. This parameter is mutually exclusive with `email`
* @param {String} [options.email] email where to send the `code` or `link`. This parameter is mutually exclusive with `phoneNumber`
* @param {String} [options.captcha] the attempted solution for the captcha, if one was presented
* @param {String} options.connection name of the passwordless connection
* @param {Object} [options.authParams] additional Auth parameters when using `link`
* @param {Object} [options.xRequestLanguage] value for the X-Request-Language header. If not set, the language is detected using the client browser.
Expand Down Expand Up @@ -8708,6 +8768,26 @@
return captcha.render(this.client, element, options, callback);
};

/**
*
* Renders the passwordless captcha challenge in the provided element.
* This function can only be used in the context of a Classic Universal Login Page.
*
* @method renderPasswordlessCaptcha
* @param {HTMLElement} element The element where the captcha needs to be rendered
* @param {Object} options The configuration options for the captcha
* @param {Object} [options.templates] An object containaing templates for each captcha provider
* @param {Function} [options.templates.auth0] template function receiving the challenge and returning an string
* @param {Function} [options.templates.recaptcha_v2] template function receiving the challenge and returning an string
* @param {Function} [options.templates.recaptcha_enterprise] template function receiving the challenge and returning an string
* @param {String} [options.lang=en] the ISO code of the language for recaptcha
* @param {Function} [callback] An optional completion callback
* @memberof WebAuth.prototype
*/
WebAuth.prototype.renderPasswordlessCaptcha = function (element, options, callback) {
return captcha.renderPasswordless(this.client, element, options, callback);
};

function PasswordlessAuthentication(request, options) {
this.baseOptions = options;
this.request = request;
Expand Down Expand Up @@ -8924,6 +9004,29 @@
.end(wrapCallback(cb));
};

/**
* Makes a call to the `/passwordless/challenge` endpoint
* and returns the challenge (captcha) if necessary.
*
* @method getChallenge
* @param {callback} cb
* @memberof PasswordlessAuthentication.prototype
*/
PasswordlessAuthentication.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, 'passwordless', 'challenge');

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

function DBConnection(request, options) {
this.baseOptions = options;
this.request = request;
Expand Down
6 changes: 3 additions & 3 deletions dist/auth0.min.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/auth0.min.esm.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/auth0.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/auth0.min.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/cordova-auth0-plugin.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* auth0-js v9.19.2
* auth0-js v9.20.0
* Author: Auth0
* Date: 2022-11-04
* Date: 2022-12-13
* License: MIT
*/

Expand All @@ -11,7 +11,7 @@
(global = global || self, global.CordovaAuth0Plugin = factory());
}(this, (function () { 'use strict';

var version = { raw: '9.19.2' };
var version = { raw: '9.20.0' };

var toString = Object.prototype.toString;

Expand Down
6 changes: 3 additions & 3 deletions dist/cordova-auth0-plugin.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cordova-auth0-plugin.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/Authentication.html
Original file line number Diff line number Diff line change
Expand Up @@ -4169,7 +4169,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Authentic
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Fri Nov 04 2022 09:43:17 GMT+0000 (Greenwich Mean Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Tue Dec 13 2022 10:49:32 GMT+0000 (Greenwich Mean Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Management.html
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Authentic
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Fri Nov 04 2022 09:43:17 GMT+0000 (Greenwich Mean Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Tue Dec 13 2022 10:49:32 GMT+0000 (Greenwich Mean Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -1995,7 +1995,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Authentic
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Fri Nov 04 2022 09:43:17 GMT+0000 (Greenwich Mean Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Tue Dec 13 2022 10:49:32 GMT+0000 (Greenwich Mean Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Redirect.html
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Authentic
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Fri Nov 04 2022 09:43:17 GMT+0000 (Greenwich Mean Time)
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Tue Dec 13 2022 10:49:32 GMT+0000 (Greenwich Mean Time)
</footer>

<script> prettyPrint(); </script>
Expand Down
Loading

0 comments on commit a05f99e

Please sign in to comment.