Custom authDomain in Firebase
<p>I am using Firebase's built-in oAuth feature for an SPA. </p>

<p>This SPA is on a domain of it's own, say <code>foobar.com</code></p>

<p>The problem is, when the oauth popup is opened, the old <code>foobar.firebaseapp.com</code> domain is used, instead of the new <code>foobar.com</code> domain</p>

<p>My init looks like this </p>

<pre><code>firebase.initializeApp({
  apiKey: '...',
  authDomain: 'foobar.firebaseapp.com',
  databaseURL: 'https://foobar.firebaseio.com',
  storageBucket: 'foobar.appspot.com',
  messagingSenderId: '123456'
})
</code></pre>

<p>I am guessing <code>authDomain</code> may have something to do with it, but if I change it to <code>foobar.com</code> I get the error:</p>

<pre><code> code: "auth/popup-closed-by-user", message: "The popup has been closed by the user before finalizing the operation."}
</code></pre>

<p>In short, is there a way I am missing to customize the oAuth url for Firebase?</p>