Angular:
9.0.3 (Ivy)
Firebase:
7.8.0
AngularFire:
6.0.0-rc.1
Other:
OS: Debian Buster
Browser: Mozilla Firefox 68.5.0esr
npm: 6.13.7
node: v13.9.0
Steps to set up and reproduce
Follow the tutorial here or any tutorial to setup authentication in a new project.
* Errors in the JavaScript console *
ERROR TypeError: "firebase_app__WEBPACK_IMPORTED_MODULE_1__.auth is undefined"
loginBegin auth.service.ts:27
NavComponent_li_17_Template_a_click_1_listener nav.component.html:34
Angular 10
core.js:5882:19
I chick login button and login should work on first click. Instead of showing the error.
I click login, I see the error on the console. Then I click the login button again, on second click, I am able to login.
P.S: I just tried with version 5 and everything worked -- It must be a change in version 6 branch! :smile:
I am not sure if this is related but I fix a similar issue by importing the auth module like this:
import { AngularFireAuth } from '@angular/fire/auth';
import { firebase } from '@firebase/app';
import '@firebase/auth';
Most helpful comment
I am not sure if this is related but I fix a similar issue by importing the auth module like this:
import { AngularFireAuth } from '@angular/fire/auth';
import { firebase } from '@firebase/app';
import '@firebase/auth';