You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey so Ive been trying to implement your plugin but I had to hack about to get it to work.
Im using ionic's capacitor to generate electron and using Angular 7 as my framework.
The electron version is:
Using your docs I tried implementing everything as you have described in the docs and got no response from the new window.
const provider = new OAuth2Provider(mapTypeToConfig('GoogleClientWebApp'));
const options = Object.assign({
show: false,
width: 800,
height: 800,
webPreferences: {
nodeIntegration: false,
contextIsolation: true,
},
})
let window = new BrowserWindow(options);
window.once("ready-to-show", () => {
window.show()
})
window.once("closed", () => {
window = null
})
provider.perform(window).then(resp => {
// window.close()
console.log("Got response (◍•ᴗ•◍):", resp)// <-- Never gets to here
}).catch(error => console.error(error))
I had a dig through the code and discovered in redirect.js this line never finished executing
webContents.session.webRequest.onBeforeRedirect({ urls: [redirectURL] },
detail => {
// Never got to here
debug("will redirect", detail.redirectURL)
if (isRedirectURL(detail.redirectURL)) {
resolve(detail.redirectURL)
}
}
)
But by altering the code to use a string instead of an array fixes it. Ive no idea why it just works after. It could be a possible update to electrn under the hood?
I thought this might be helpful incase anyone comes accross this too
The text was updated successfully, but these errors were encountered:
dennington-bear
changed the title
Not getting response from provder.perform(window)
Not getting response from provder.perform(window) (Possible update)
Apr 26, 2019
Basically the same problem appears in my environment: "electron": "4.0.8", "electron-oauth-helper": "3.0.0",
The relevant redirect is not detected and no response is provided.
Also both the fix described above and entirely removing the argument { urls: [redirectURL] }, restored the redirection detection and thereby resolved the problem.
Hey so Ive been trying to implement your plugin but I had to hack about to get it to work.
Im using ionic's capacitor to generate electron and using Angular 7 as my framework.
The electron version is:
Using your docs I tried implementing everything as you have described in the docs and got no response from the new window.
I had a dig through the code and discovered in redirect.js this line never finished executing
But by altering the code to use a string instead of an array fixes it. Ive no idea why it just works after. It could be a possible update to electrn under the hood?
I thought this might be helpful incase anyone comes accross this too
The text was updated successfully, but these errors were encountered: