Skip to content
This repository has been archived by the owner on Jun 10, 2018. It is now read-only.

Update index.js to allow custom configurations #24

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var generateRandomString = function (length) {
return text;
};

module.exports = function (config, windowParams) {
module.exports = function (config, windowParams, customConfig) {
function getAuthorizationCode(opts) {
opts = opts || {};

Expand All @@ -42,7 +42,7 @@ module.exports = function (config, windowParams) {
urlParams.access_type = opts.accessType;
}

var url = config.authorizationUrl + '?' + queryString.stringify(urlParams);
var url = config.authorizationUrl + '?' + queryString.stringify(urlParams) + '&' + queryString.stringify(customConfig);

return new Promise(function (resolve, reject) {
const authWindow = new BrowserWindow(windowParams || {'use-content-size': true});
Expand Down