android - Manage Firebase users in app -
i'm developing android app needs able manage user list. problem is, firebase doesn't seem offer support kind of scenario, opposed social apps users self-registering , managing own accounts. create users in firebase console, not enough.
the users registered email , password, users must have admin permissions , allowed edit user list, can enforce using security rules. however, users listed in firebase console don't have place put information permissions, info must go in main database. editing database tree in console not reasonable, hence must done in app.
first problem is, there no way user list app. workaround, can create users in app using createuserwithemailandpassword() function. then, can save user info in main database, keeping them in sync.
minor problems aside (such newly created user getting automatically signed in, signing out admin user), function starts fail , error logs indicate "too_many_attempts_try_later". not acceptable.
any suggestions appreciated. thank you.
the users registered email , password, users must have admin permissions , allowed edit user list, can enforce using security rules. however, users listed in firebase console don't have place put information permissions, info must go in main database
you should separate worflow admins add admin uid db node "admins".
then whenever need check if user admin using rules can uses ".write": "root.child('admins/'+$user_id).exists()"
creating , login in other users seems pretty unintuitive me, suggest using dynamic links invites , let invited users, install app, create own users , sign in themselves. can use dynamic link info see whoever invited them , act accordingly.
Comments
Post a Comment