I want to make a list of admins in firebase. Admins users should be able to add other admins, by email.
Ideally, I'd like a "list" like this:
"admins": {
"a.b@gmail.com": true,
"c.d@gmail.com": true
}
This would allow me to easily add new admins by email, and to use useful authentication rules (that verify users by email), like this :
".write": "root.child('admins').child(auth.email).val() === true"
But I can't use a list like that, because Firebase restricts special characters in keys.
How can I solve this?
My application is client-side javascript (so I can't use firebase-admin).
Thanks!