Firebase auth PROVIDER_ID is undefined
See original GitHub issue- Operating System version: macOS High Sierra 10.13.6
- Browser version: Chrome Version 68.0.3440.106
- Firebase UI version: firebaseui 3.4.1
- Firebase SDK version: 5.5.0
- Node: 8.11.1
I’m using react 16.5.0 and receiving the following error “Cannot read property ‘PROVIDER_ID’ of undefined”
I initialize firebase in a config file and import firebase and firebaseui like so
import firebase from '../config.js';
import firebaseui from 'firebaseui';
I’m able to use firebase.auth() in the same file. So I know firebase was initialized and is working.
firebase.auth().signInWithEmailAndPassword(username, password)
I enabled the Email/Password signin provider in the project console. Below is the code that I have in my componentDidMount()
method.
var uiConfig = {
signInSuccessUrl: '/home',
signInOptions: [firebase.auth.EmailAuthProvider.PROVIDER_ID]
}
var ui = new firebaseui.auth.AuthUI( firebase.auth() );
ui.start('#firebaseui-auth-container', uiConfig);
Is anyone else running into this or have an idea what’s going on?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
"Cannot read property 'PROVIDER_ID' of undefined" error on ...
PROVIDER_ID ], tosUrl: "http://howlbits.com" }; // Initialize the FirebaseUI Widget using Firebase. var ui = new firebaseui.auth.
Read more >Javascript html firebase returning undefined - Stack Overflow
1 Answer 1 ... As explained in the doc, " currentUser might be null because the auth object has not finished initializing". ......
Read more >Admin Authentication API Errors | Firebase - Google
The providerId must be a valid supported provider identifier string. auth/invalid-oauth-responsetype, Only exactly one OAuth responseType should be set to true.
Read more >capacitor-firebase/authentication - NPM Package Overview
This plugin enables the use of Firebase Authentication in a Capacitor app. It uses the Firebase SDK for Java (Android), Swift (iOS) and ......
Read more >useAuth | VueUse
useAuth. Reactive Firebase Auth binding. It provides a reactive user and isAuthenticated so ... boolean | undefined) => Promise<string> isAnonymous: boolean ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@wti806 You are correct! I’m not sure why the auth() was working after initializing firebase and then exporting. I exported the config object and then initialized in the component. Thanks!
@joshkuhar Don’t you need to export the firebase object from config.js?