Skip to content

Commit 4a33fd9

Browse files
committed
Release v9.3.0
1 parent b93797f commit 4a33fd9

16 files changed

+1843
-826
lines changed

CHANGELOG.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11

2+
## [v9.3.0](https://github.com/auth0/auth0.js/tree/v9.3.0) (2018-02-22)
3+
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.2.3...v9.3.0)
4+
5+
**Fixed**
6+
- Throw error when hash.state is empty [\#673](https://github.com/auth0/auth0.js/pull/673) ([luisrudge](https://github.com/luisrudge))
7+
- Use WinChan on popup.callback again + adding origin check to keep it secure [\#669](https://github.com/auth0/auth0.js/pull/669) ([luisrudge](https://github.com/luisrudge))
8+
- Fixed error handling for auth in popup mode [\#668](https://github.com/auth0/auth0.js/pull/668) ([luisrudge](https://github.com/luisrudge))
9+
- Fix inconsistent cross origin error handling [\#667](https://github.com/auth0/auth0.js/pull/667) ([luisrudge](https://github.com/luisrudge))
10+
211
## [v9.2.3](https://github.com/auth0/auth0.js/tree/v9.2.3) (2018-02-14)
312
[Full Changelog](https://github.com/auth0/auth0.js/compare/v9.2.2...v9.2.3)
413

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ From CDN
2020

2121
```html
2222
<!-- Latest patch release -->
23-
<script src="https://cdn.auth0.com/js/auth0/9.2.3/auth0.min.js"></script>
23+
<script src="https://cdn.auth0.com/js/auth0/9.3.0/auth0.min.js"></script>
2424
```
2525

2626
From [npm](https://npmjs.org)

docs/Authentication.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ <h5>Parameters:</h5>
499499
<br class="clear">
500500

501501
<footer>
502-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.0</a> on Tue Dec 26 2017 16:09:39 GMT-0200 (-02) using the Minami theme.
502+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.0</a> on Thu Feb 22 2018 17:45:54 GMT-0300 (-03) using the Minami theme.
503503
</footer>
504504

505505
<script>prettyPrint();</script>

docs/Management.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ <h5>Parameters:</h5>
294294
<br class="clear">
295295

296296
<footer>
297-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.0</a> on Tue Dec 26 2017 16:09:39 GMT-0200 (-02) using the Minami theme.
297+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.0</a> on Thu Feb 22 2018 17:45:55 GMT-0300 (-03) using the Minami theme.
298298
</footer>
299299

300300
<script>prettyPrint();</script>

docs/WebAuth.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ <h4 class="name" id="WebAuth"><span class="type-signature"></span>new WebAuth<sp
9999

100100
<dt class="tag-source">Source:</dt>
101101
<dd class="tag-source"><ul class="dummy"><li>
102-
<a href="web-auth_index.js.html">web-auth/index.js</a>, <a href="web-auth_index.js.html#line33">line 33</a>
102+
<a href="web-auth_index.js.html">web-auth/index.js</a>, <a href="web-auth_index.js.html#line34">line 34</a>
103103
</li></ul></dd>
104104

105105

@@ -571,7 +571,7 @@ <h5>Parameters:</h5>
571571
<br class="clear">
572572

573573
<footer>
574-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.0</a> on Tue Dec 26 2017 16:09:39 GMT-0200 (-02) using the Minami theme.
574+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.0</a> on Thu Feb 22 2018 17:45:55 GMT-0300 (-03) using the Minami theme.
575575
</footer>
576576

577577
<script>prettyPrint();</script>

docs/authentication_db-connection.js.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ <h1 class="page-title">authentication/db-connection.js</h1>
113113
*
114114
* @method changePassword
115115
* @param {Object} options
116-
* @param {String} options.email address where the user will recieve the change password email. It should match the user's email in Auth0
116+
* @param {String} options.email address where the user will receive the change password email. It should match the user's email in Auth0
117117
* @param {String} options.connection name of the connection where the user was created
118118
* @param {changePasswordCallback} cb
119119
* @see {@link https://auth0.com/docs/api/authentication#change-password}
@@ -154,7 +154,7 @@ <h1 class="page-title">authentication/db-connection.js</h1>
154154
<br class="clear">
155155

156156
<footer>
157-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.0</a> on Tue Dec 26 2017 16:09:39 GMT-0200 (-02) using the Minami theme.
157+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.0</a> on Thu Feb 22 2018 17:45:54 GMT-0300 (-03) using the Minami theme.
158158
</footer>
159159

160160
<script>prettyPrint();</script>

docs/authentication_index.js.html

+32-6
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,15 @@ <h1 class="page-title">authentication/index.js</h1>
6767
* @see {@link https://auth0.com/docs/api/authentication}
6868
*/
6969
function Authentication(auth0, options) {
70+
// If we have two arguments, the first one is a WebAuth instance, so we assign that
71+
// if not, it's an options object and then we should use that as options instead
72+
// this is here because we don't want to break people coming from v8
73+
if (arguments.length === 2) {
74+
this.auth0 = auth0;
75+
} else {
76+
options = auth0;
77+
}
78+
7079
/* eslint-disable */
7180
assert.check(
7281
options,
@@ -99,7 +108,6 @@ <h1 class="page-title">authentication/index.js</h1>
99108
/* eslint-enable */
100109

101110
this.baseOptions = options;
102-
this.auth0 = auth0;
103111
this.baseOptions._sendTelemetry = this.baseOptions._sendTelemetry === false
104112
? this.baseOptions._sendTelemetry
105113
: true;
@@ -180,8 +188,14 @@ <h1 class="page-title">authentication/index.js</h1>
180188
params.connection_scope = params.connection_scope.join(',');
181189
}
182190

191+
params = objectHelper.blacklist(params, [
192+
'username',
193+
'popupOptions',
194+
'domain',
195+
'tenant',
196+
'timeout'
197+
]);
183198
params = objectHelper.toSnakeCase(params, ['auth0Client']);
184-
params = objectHelper.blacklist(params, ['username']);
185199
params = parametersWhitelist.oauthAuthorizeParams(this.warn, params);
186200

187201
qString = qs.stringify(params);
@@ -222,7 +236,15 @@ <h1 class="page-title">authentication/index.js</h1>
222236

223237
params = objectHelper.toSnakeCase(params, ['auth0Client', 'returnTo']);
224238

225-
qString = qs.stringify(params);
239+
qString = qs.stringify(objectHelper.blacklist(params, ['federated']));
240+
if (
241+
options &amp;&amp;
242+
options.federated !== undefined &amp;&amp;
243+
options.federated !== false &amp;&amp;
244+
options.federated !== 'false'
245+
) {
246+
qString += '&amp;federated';
247+
}
226248

227249
return urljoin(this.baseOptions.rootUrl, 'v2', 'logout', '?' + qString);
228250
};
@@ -338,8 +360,6 @@ <h1 class="page-title">authentication/index.js</h1>
338360
body = objectHelper.toSnakeCase(body, ['auth0Client']);
339361
body = parametersWhitelist.oauthTokenParams(this.warn, body);
340362

341-
body.grant_type = body.grant_type;
342-
343363
return this.request.post(url).send(body).end(responseHandler(cb));
344364
};
345365

@@ -396,6 +416,12 @@ <h1 class="page-title">authentication/index.js</h1>
396416
* @param {Function} cb
397417
*/
398418
Authentication.prototype.getSSOData = function(withActiveDirectories, cb) {
419+
/* istanbul ignore if */
420+
if (!this.auth0) {
421+
// we can't import this in the constructor because it'd be a ciclic dependency
422+
var WebAuth = require('../web-auth/index'); // eslint-disable-line
423+
this.auth0 = new WebAuth(this.baseOptions);
424+
}
399425
if (typeof withActiveDirectories === 'function') {
400426
cb = withActiveDirectories;
401427
}
@@ -542,7 +568,7 @@ <h1 class="page-title">authentication/index.js</h1>
542568
<br class="clear">
543569

544570
<footer>
545-
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.0</a> on Tue Dec 26 2017 16:09:39 GMT-0200 (-02) using the Minami theme.
571+
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.0</a> on Thu Feb 22 2018 17:45:54 GMT-0300 (-03) using the Minami theme.
546572
</footer>
547573

548574
<script>prettyPrint();</script>

0 commit comments

Comments
 (0)