Firebase email verification behavior

前端 未结 1 393
清歌不尽
清歌不尽 2020-12-19 20:57

I\'ve got a question about how firebase email verification work.

Case:

  1. My user signed in my site (using device A).
  2. They creat
相关标签:
1条回答
  • 2020-12-19 21:21

    The email verification occurs out of band and would not affect any existing firebase states until it is reloaded. If a user verifies their email, you have to call firebase.auth().currentUser.reload() to update the emailVerified property. If you are using firebase rules with emailVerified field, you need to force a token refresh (firebase.auth().currentUser.getToken(true)) after verification. You can use the Firebase realtime database to set some flag on email verification and detect it in the existing session to force a user to reload. This would require you build your own custom email verification handler: https://firebase.google.com/docs/auth/custom-email-handler

    0 讨论(0)
提交回复
热议问题