Angular 2+ Firebase Authentication - Set Login State Persistence

后端 未结 3 1020
清酒与你
清酒与你 2021-01-12 14:07

I\'ve set up authentication using firebase for an angular app in an auth service, and I\'m trying to ensure session state persistence following successful login.

I\'

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-12 14:46

    add

    this.firebaseAuth
        .auth
    
        .setPersistence(firebase.auth.Auth.Persistence.LOCAL)
    
        .signInWithEmailAndPassword(email, password)
    

提交回复
热议问题