How to make admin approve new user firebase auth flutter?

417

The way I would do it is to have preferences associated to every user in a separate collection. You can have your login function check if userId.isApproved is true and if it is, you continue. Otherwise, you'd log them out and redirect them to a page saying "This user in not approved"

Share:
417
FadyFouad
Author by

FadyFouad

Updated on January 01, 2023

Comments

  • FadyFouad
    FadyFouad over 1 year

    I Have a Project Manager App With 3 roles (Admin - Engineer - technicals) I want to make admin approve new Users before they can authenticate to firebase by sending OTP (One-time password) to signup. So that no one can create a new Account on firestore without admin permission. I'm using flutter 2.2 And Firebase Email/Password Authentication.