Only let pre-verified users log into Firebase

后端 未结 1 1099
轻奢々
轻奢々 2020-12-21 17:50

Right now, I only want users who have already registered and been verified with our software to login, and I have saved the list of emails of users (stripped of special char

相关标签:
1条回答
  • 2020-12-21 18:16

    I'm pretty sure this has been covered before: there currently is no way to prevent users from signing in with Firebase Authentication. But if you want to prevent them from accessing backend resources, you can check whether their email address is verified either in the server-side security rules (for Realtime Database, Storage, or Firestore), or in your own server-side code.

    At I/O a demo was given of upcoming functionality in Cloud Function that would allow you to prevent signing in users without a verified email address. But I don't know when this functionality will available in a public API.

    Also see:

    • Firebase Prevent Creating Account Before Email Verification
    • How to prevent user authentication in Firebase/Vue.js BEFORE email is verified
    • How do I lock down Firebase Database to any user from a specific (email) domain?
    0 讨论(0)
提交回复
热议问题