0
//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 version --5.0.0-rc.10 firebase version --4.13.1

I have imported the AngularFireAuthModule and AngularFireModule in my app.module.ts and enabled google authentication in firebase console but am still getting an error message as-this is the error message i get Please Help !!

Rahul Somasundaram
  • 578
  • 1
  • 6
  • 16
Kanav Malik
  • 143
  • 1
  • 1
  • 12

1 Answers1

0

did you provided the correct Config for FireBase? With all you auth domain and api keys?

See step 4: AngularFire2 installation Guide

Please don't forget to not post the config here, or to change your values as it contains Secret keys.