Open sittidetj opened 6 years ago
@sittidetj this was written for an older version of angularfire2. There is some updated documentation at: https://github.com/angular/angularfire2/blob/master/docs/5-user-authentication.md
The way I implemented this was:
import { Injectable } from '@angular/core';
import { AngularFireAuth } from 'angularfire2/auth';
import * as firebase from 'firebase/app';
@Injectable()
export class AuthService {
constructor(public afAuth: AngularFireAuth) { }
loginWithGoogle() {
return this.afAuth.auth.signInWithPopup(new firebase.auth.GoogleAuthProvider());
}
logout() {
return this.afAuth.auth.signOut();
}
}
Hope that helps
Dear Team
Thank you for information.
SJ.
On 14Aug, 2560 BE, at 10:48 AM, Anson VanDoren notifications@github.com wrote:
@sittidetj https://github.com/sittidetj this was written for an older version of angularfire2. There is some updated documentation at: https://github.com/angular/angularfire2/blob/master/docs/5-user-authentication.md https://github.com/angular/angularfire2/blob/master/docs/5-user-authentication.md The way I implemented this was:
import { Injectable } from '@angular/core';
import { AngularFireAuth } from 'angularfire2/auth'; import * as firebase from 'firebase/app';
@Injectable() export class AuthService {
constructor(public afAuth: AngularFireAuth) { } loginWithGoogle() { return this.afAuth.auth.signInWithPopup(new firebase.auth.GoogleAuthProvider()); } logout() { return this.afAuth.auth.signOut(); }
} Hope that helps
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/seeschweiler/angular-firebase-authentication-sample/issues/1#issuecomment-322094075, or mute the thread https://github.com/notifications/unsubscribe-auth/ADjQrRBfjtq-K-vBJII5g_HQTDrDkAmmks5sX8OjgaJpZM4OnReO.
Hello, my name is SJ. I try with your document. But it show error when I import ==> { AngularFire, AuthProviders, AuthMethods } from 'angularfire2'; Do you have any update ?
Thank you.