AngularFireAuth issue : = > .auth not working please help and reply as soon as ...

60 views
Skip to first unread message

Akash Prasad

unread,
May 6, 2020, 11:34:50 AM5/6/20
to Firebase Google Group
import { Injectable } from '@angular/core';
import { AngularFireAuth } from "@angular/fire/auth";
import { Observable } from 'rxjs';
 
@Injectable({
providedIn: 'root'
})
 
export class AuthenticationService {
userDataObservable<firebase.User>;
 
constructor(private angularFireAuthAngularFireAuth) {
this.userData = angularFireAuth.authState;
}
 
/* Sign up */
SignUp(emailstringpasswordstring) {
this.angularFireAuth
.auth
.createUserWithEmailAndPassword(emailpassword)
.then(res => {
console.log('You are Successfully signed up!'res);
})
.catch(error => {
console.log('Something is wrong:'error.message);
});
}
 
/* Sign in */
SignIn(emailstringpasswordstring) {
this.angularFireAuth
.auth
.signInWithEmailAndPassword(emailpassword)
.then(res => {
console.log('You are Successfully logged in!');
})
.catch(err => {
console.log('Something is wrong:',err.message);
});
}
 
/* Sign out */
SignOut() {
this.angularFireAuth
.auth
.signOut();
}
 
}
Screenshot (198).png
Screenshot (199).png
Screenshot (200).png
Screenshot (201).png
Screenshot (202).png
Reply all
Reply to author
Forward
0 new messages