firebase / firebase/firebase-js-sdk

auth().signInWithPopup failing for Facebook on Firefox

Open
#1,003 30 comments 14 reactions 0 assignees View on GitHub
api: auth bug internal-bug-filed Priority: p3
Dominant language
TypeScript
Stars
5.1k
Forks
1k
Avg merge
2d 21h
Merged PRs (30d)
37

Description

* Operating System version: macOS 10.13.5
* Browser version: Firefox 61.0.01
* Firebase SDK version: 5.2.0
* Firebase Product: auth

### Describe the problem
Firefox's Facebook container seems to be causing the `auth().signInWithPopup` flow to fail at the redirect and close stage.

The popup window logs the warning _"Scripts may not close windows that were not opened by script."_
The SDK returns _"The popup has been closed by the user before finalizing the operation."_

Realise this is due to an addon, but it seems like it might be a fairly common issue amongst Firefox users given its popularity. It's definitely causing me heartache. I'd file a bug with Mozilla but I'm not sure of the exact details, i.e. is this likely to effect most oauth implementations?

#### Steps to reproduce:

- use Firefox with the [Facebook Container addon](https://addons.mozilla.org/en-US/firefox/addon/facebook-container/) enabled
- attempt the `signInWithPopup` auth flow, using Facebook as the auth provider

#### Relevant Code:

```javascript
const provider = new firebase.auth.FacebookAuthProvider();
firebase.auth().signInWithPopup(provider).then(e => console.log)
.catch(e => console.log);
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.