Я прочитал все сообщения по этой проблеме, но я не могу применить решения к моей реализации. У меня есть следующие узлы в firebase: ![enter image description here](https://i.stack.imgur.com/GRuuE.png)
Служба привязана к обычной реактивной форме для регистрации пользователя
export class UserService {
constructor(private db: AngularFireDatabase) { }
createUser(user:User){
this.db.list('/users').push(user)
}
И затем логин:
constructor(private afAuth: AngularFireAuth,
private db: AngularFireDatabase,
private router: Router) { }
emailLogin(email:string, password:string) {
return this.afAuth.auth.signInWithEmailAndPassword(email, password)
.then((user) => {
console.log("user details:",user);
this.router.navigate(['/home']);
console.log('Successfully Signed In');
}).catch((error) => console.log(error));
}
И я получаю сообщение: There is no user record corresponding to this identifier. etc
Но когда я читаю, это какая-то функция безопасности от firebase. Так что я могу сделать, чтобы обойти это?
РЕДАКТИРОВАТЬ @ Андрей
AuthService:
createUser(email:string, password:string){
this.afAuth.auth.createUserWithEmailAndPassword(email, password)
.then((user)=>{
this.router.navigate(['/login']);
console.log('Successfully registered');
}).catch(error=>console.log(error))
}
emailLogin(email:string, password:string) {
return this.afAuth.auth.signInWithEmailAndPassword(email, password)
.then((user) => {
localStorage.setItem('currentUser', JSON.stringify(user));
console.log("user details:",user);
this.router.navigate(['/home']);
console.log('Successfully Signed In');
}).catch((error) => console.log(error));
}
Сообщение об ошибке остается тем же, плюс, я не вижу ни одного созданного узла на пожарной консоли