diff --git a/index.js b/index.js index 3221e00..de8b0c9 100644 --- a/index.js +++ b/index.js @@ -19,7 +19,7 @@ var generateRandomString = function (length) { return text; }; -module.exports = function (config, windowParams) { +module.exports = function (config, windowParams, clearStorageData = false) { function getAuthorizationCode(opts) { opts = opts || {}; @@ -49,6 +49,10 @@ module.exports = function (config, windowParams) { return new Promise(function (resolve, reject) { const authWindow = new BrowserWindow(windowParams || {'use-content-size': true}); + if (clearStorageData) { + authWindow.webContents.session.clearStorageData(); + } + authWindow.loadURL(url); authWindow.show();