我正在使用 firestore 編寫一個有角度的應用程序。我正在調用 Auth::createUserWithEmailAndPassword( 來注冊用戶并調用 Auth::signInWithEmailAndPassword。在這兩種情況下,用戶都會登錄并觸發以下訂閱this.afa.authState.subscribe( authState => { this.firebaseUser = authState; if (authState) { this.onLoginSuccessfulReceivedFromFirebase(); } else { this.onLogout(); } this.isLoggedIn = authState != null;});有沒有辦法讓我確定回調是否在 createUserWithEmailAndPassword 期間自動登錄或在回調函數中專門調用 Auth::signInWithEmailAndPassword 時被觸發
如何區分登錄和注冊收到的 fireauth 登錄回調
陪伴而非守候
2022-01-01 20:01:42