//Login component.ts
import { Component } from '@angular/core';
import {AngularFireAuth} from 'angularfire2/auth';
import * as firebase from 'firebase/app';
import {Router} from '@angular/router';
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.css']
})
export class LoginComponent {
constructor(public afAuth: AngularFireAuth , public router: Router) { }
login() {
this.afAuth.auth.signInWithPopup(new firebase.auth.GoogleAuthProvider()).then((sucess) => {
this.router.navigate(['/option']);
});
}
angularFire2 版本--5.0.0-rc.10 firebase 版本--4.13.1
我已经在我的 app.module.ts 中导入了 AngularFireAuthModule 和 AngularFireModule 并在 firebase 控制台中启用了 google 身份验证,但仍然收到一条错误消息,因为这是我收到的错误消息, 请帮助!