Firebase Simple Login - Preventing New Users

I am using the Simple Email Email / Password Authentication function for Firebase.

I would like to manage users only through Forge. I do not want users to be created through the client application.

However, I would still like to let them log in / log out.

Is it possible?

+4
source share
1 answer

You cannot prevent users from creating a client using a simple login. Instead, you can use two options:

Simple login accounts are just tokens

- , Firebase. , , Firebase. , , .

. , . Forge , - , , .

:

".write": "root.child('valid_account/'+auth.uid).exists()"

, , Forge (admin: true) :

"profiles": {
  "$uid": {
    ".write": "data.exists() && auth.uid === $uid && newData.exists()"
  }
}

OCD , Simple Login. , . .

, .

+5

Source: https://habr.com/ru/post/1543426/


All Articles