When I send a wrong email for validation it returns the message recovery email sent and not that the user is not on the list or was deleted... is that a new kind of response from firebase to hide the true response?
Hello I'm having an error with importing firebase as you did at 4:46 in the video and as a result my app won't log in and has errors saying *cannot find module 'firebase' or its corresponding type declarations.ts(2307)* Please can this be resolved
Hello sir I'm getting error that says: Argument of type '{email: string; Id : string} is not assignable to parameter of type 'User' Can you please resolve this error
When I send a wrong email for validation it returns the message recovery email sent and not that the user is not on the list or was deleted... is that a new kind of response from firebase to hide the true response?
Hello I'm having an error with importing firebase as you did at 4:46 in the video and as a result my app won't log in and has errors saying
*cannot find module 'firebase' or its corresponding type declarations.ts(2307)*
Please can this be resolved
Hi! I am having the same issue, did you find a solution?
i checked the '@angular/fire/auth' doc, and this is my file...
import { Injectable, inject } from '@angular/core';
import { Observable } from 'rxjs';
import { User } from 'src/app/shared/model/user/User';
import { setPersistence, signInWithEmailAndPassword, browserLocalPersistence } from 'firebase/auth';
import { Auth, UserCredential, sendPasswordResetEmail } from '@angular/fire/auth';
@Injectable({
providedIn: 'root'
})
export class AuthService {
private auth: Auth = inject(Auth);
constructor() { }
recoverEmailPassword(email: string): Observable {
return new Observable(observer => {
sendPasswordResetEmail(this.auth, email).then(() => {
observer.next();
observer.complete();
}).catch(error => {
observer.error(error);
observer.complete();
})
});
}
login(email: string, password: string): Observable {
return new Observable(observer => {
setPersistence(this.auth, browserLocalPersistence).then(() => {
signInWithEmailAndPassword(this.auth, email, password)
.then((firebaseUser: UserCredential) => {
observer.next({ email, id: firebaseUser.user.uid });
observer.complete();
})
.catch((err) => {
observer.error(err);
observer.complete();
});
});
});
}
}
hello sir, when I put an error email, the return is 'user is found'. please help me
Links:
Firebase: firebase.google.com/
Ionic Framework: ionicframework.com/
Social:
Github: github.com/paulorsaf
Twitter: twitter.com/paulorsaf
Instagram: instagram.com/paulorsaf
Doubts? Join me on Discord:
discord.com/invite/z92XBeHq6F
Hello sir I'm getting error that says: Argument of type '{email: string; Id : string} is not assignable to parameter of type 'User'
Can you please resolve this error
login(email: string, password: string) : Observable {
return new Observable(observer => {
signInWithEmailAndPassword(this.auth, email, password)
.then((userCredential) => {
this.user = userCredential.user.uid;
observer.next({email, id:this.user});
observer.complete();
})
.catch((error) => {
const errorCode = error.code;
const errorMessage = error.message;
observer.error(error);
observer.complete();
});
})
}