Im using an angular application with firebase, and i have the feature that allows the admin user to create more users this is the code im using in my AuthService
registerEmployeeByEmail(user: User, password: string): Observable<void> {
return from(this.afAuth.auth.createUserWithEmailAndPassword(user.email, password).then(credentials => {
user.id = credentials.user.uid;
this.db.doc(this.dbPath + user.id).set(user);
}));
}
the problem is that right after the newly user is being logged in, the idea is not to log him in automatically...