Skip to content

Commit

Permalink
support timeout option in Popup.loginWithCredentials (#1273)
Browse files Browse the repository at this point in the history
* support timeout option in Popup.loginWithCredentials

* add tests for popup+timeout
  • Loading branch information
stevehobbsdev authored Oct 28, 2022
1 parent 093bc72 commit 60563bc
Show file tree
Hide file tree
Showing 2 changed files with 207 additions and 149 deletions.
11 changes: 9 additions & 2 deletions src/web-auth/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,19 @@ Popup.prototype.authorize = function(options, cb) {
* @param {credentialsCallback} cb
* @memberof Popup.prototype
*/
Popup.prototype.loginWithCredentials = function(options, cb) {
Popup.prototype.loginWithCredentials = function (options, cb) {
options.realm = options.realm || options.connection;
options.popup = true;
options = objectHelper
.merge(this.baseOptions, ['redirectUri', 'responseType', 'state', 'nonce'])
.merge(this.baseOptions, [
'redirectUri',
'responseType',
'state',
'nonce',
'timeout'
])
.with(objectHelper.blacklist(options, ['popupHandler', 'connection']));

options = this.transactionManager.process(options);
this.crossOriginAuthentication.login(options, cb);
};
Expand Down
Loading

0 comments on commit 60563bc

Please sign in to comment.