Disable account chooser FirebaseUI React

Thanks, Rafik! I've been looking for a solution to this for hours.

It turns out that firebaseui.auth.CredentialHelper.NONE === 'none', so I'm using that instead of importing the extra firebaseui.

I don't love either solution (importing extra stuff or using the constant's underlying value), and I certainly wish they'd include that constant in react-firebaseui.


This worked for me: According to the comments above, add credentialHelper beneath your signInOptions Array in uiConfig. Full code below:

import React, { Component } from 'react';
import '../App.css';
import StyledFirebaseAuth from 'react-firebaseui/StyledFirebaseAuth';
import * as firebase from 'firebase'

const uiConfig = {
    signInFlow: 'popup',
    signInSuccessUrl: '/signedIn',
    signInOptions: [
        firebase.auth.GoogleAuthProvider.PROVIDER_ID,
        firebase.auth.FacebookAuthProvider.PROVIDER_ID,
        firebase.auth.EmailAuthProvider.PROVIDER_ID,
    ],
    credentialHelper: 'none'
};

export default class SignInScreen extends Component {

    render() {
        return (
            <div>
            <h1>My App</h1>
            <p>Please sign-in:</p>
            <StyledFirebaseAuth uiConfig={uiConfig} firebaseAuth={firebase.auth()}/>
            </div>
        );
    }

} 

Well, for those it may help, I found a solution to that problem.

  1. yarn add firebaseui
  2. import firebaseui from 'firebaseui'
  3. set credentialHelper: firebaseui.auth.CredentialHelper.NONE in the uiConfig object.

I don't know if installing firebaseui over firebaseUI web react is something good, but it solved my problem.