mawie81 / electron-oauth2

A library to handle OAuth2 authentication for your Electron app.
MIT License
99 stars 56 forks source link

Exception due to window already destroyed #27

Open rogeru opened 7 years ago

rogeru commented 7 years ago

In my case I get 'will-navigate' and a 'did-get-redirect-request' which means onCallback is called a second time. Resolving a promise a second time does not harm, but the window is already close on the first callback and therefore an exception is raised when trying to access it or close it again.

Another minor issue is that opts.additionalTokenRequestData throws an exception if no options object is passed in.

I will create a pull request.

aguynamedben commented 6 years ago

Thanks for the PR, I'll review it soon and hopefully merge it (I'm new at helping maintain this repo, so it might take a little bit).