How to use email as a key in our firebase databse

Can the user use the email as a key to store data in our firebase database

2 Likes

Ok (1)you can use sign in mode ( Need to enable escrow )and set firebase rules:
{ "rules": { ".read": "auth.uid != null", ".write": "auth.uid != null" } }

use UID

(2) key cannot use “@” or “.”
replace “@” to &1 and “.” to &2

Email cannot use & - % #
Key cannot use @ .

(3) only use @gmail.com
Get text before@

Use the Sign-In component to validate Email. The sign-in component will generate a unique ID for each email. Use this UID in your RTDB.

thank you so much that’s a really good idea I will try it out and get back to you tomorrow…
Thank you

i think im gonna go for replacing the text option rather than getting the text before @gmail.com :grinning:

If you only allow gmail to log in
Get "example"@gmail.com