Not Able To Get Current User Details That is Logged in using onAuthStateChanged

Viewed 20
export class AuthService {
  
  constructor(private auth:Auth){

     const authi =getAuth();
     onAuthStateChanged(authi,async(user)=>{
      if(user!=null){
       this.currUser=user;
      }
      else{
        this.currUser=null;
      }
     })
   }

    db = getFirestore();
    currUser!: UserInterface | null;
}
0 Answers
Related