firebase / firebase/firebase-js-sdk
firebase.auth().signInWithPopup fails for sites running in an Electron BrowserWindow
- Dominant language
- TypeScript
- Stars
- 5.1k
- Forks
- 1k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 37
Description
### Environment
* Operating System version: `OS X 10.12.6`
* Browser version: `Electron BrowserWindow` - `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36` '
* Firebase SDK version: `4.7.1`
* Firebase Product: `auth`
### Issue
`firebase.auth().signInWithPopup(provider)` fails to work when running a website from within an electron BrowserWindow. Fails for both `FacebookAuthProvider` and `GoogleAuthProvider` (only ones I've tested). Works fine on the website, just fails in Electron, most likely due to the way popups are handled.
#### Steps to reproduce:
1. Find a website that already uses `firebase.auth().signInWithPopup` and works as expected
2. Load website into an Electron BrowserWindow.
3. Attempt to authenticate the same way you would on the standard website
4. Observe the error handler is triggered with the following stacktrace:
```
TypeError: Cannot set property 'href' of null
at Xe (https://www.gstatic.com/firebasejs/4.8.0/firebase.js:13:30361)
at https://www.gstatic.com/firebasejs/4.8.0/firebase.js:13:109329
at r.g (https://www.gstatic.com/firebasejs/4.8.0/firebase.js:13:8197)
at mt (https://www.gstatic.com/firebasejs/4.8.0/firebase.js:13:9189)
at vt (https://www.gstatic.com/firebasejs/4.8.0/firebase.js:13:9080)
at Z.ou.Qb (https://www.gstatic.com/firebasejs/4.8.0/firebase.js:13:81801)
at $ (https://www.gstatic.com/firebasejs/4.8.0/firebase.js:13:6669)
```
Contributor guide
Assessment
This issue has not been assessed yet.