Skip to content

Commit

Permalink
Enable auth process in new tab instead of popup by reseting popup wid…
Browse files Browse the repository at this point in the history
…th and height
  • Loading branch information
dgrubelic committed Oct 1, 2017
1 parent e351407 commit 5b9d14c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/oauth/oauth1.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const defaultProviderConfig = {
requiredUrlParams: null,
defaultUrlParams: null,
oauthType: '1.0',
popupOptions: { width: null, height: null }
popupOptions: {}
}

export default class OAuth {
Expand Down
2 changes: 1 addition & 1 deletion src/oauth/oauth2.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const defaultProviderConfig = {
redirectUri: 'redirectUri'
},
oauthType: '2.0',
popupOptions: { width: null, height: null }
popupOptions: {}
}

export default class OAuth2 {
Expand Down
6 changes: 4 additions & 2 deletions src/oauth/popup.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Promise from '../promise.js'
import { objectExtend, parseQueryString, getFullUrlPath } from '../utils.js'
import { objectExtend, parseQueryString, getFullUrlPath, isUndefined } from '../utils.js'

/**
* OAuth2 popup management class
Expand Down Expand Up @@ -79,7 +79,9 @@ export default class OAuthPopup {
_stringifyOptions() {
let options = []
for (var optionKey in this.popupOptions) {
options.push(`${optionKey}=${this.popupOptions[optionKey]}`)
if (!isUndefined(this.popupOptions[optionKey])) {
options.push(`${optionKey}=${this.popupOptions[optionKey]}`)
}
}
return options.join(',')
}
Expand Down

0 comments on commit 5b9d14c

Please sign in to comment.