I want to create a login system , when the user logs in, based on the logged in users email id, I want to retrieve the EID.
The JSON structure I want is:
{
"[email protected]":
{
"EID":"0153"
},
"[email protected]":
{
"EID":"0163"
}
}
I tried importing the JSON file with above structure into the Firebase projects database, but got an error suggesting "./ ..." cannot be a part of key.
Replacing one character with another may lead to confusion and may cause critical issues in future.
For the instance, replacing .
with _DOT_
may work for now. Say in future you want to get back the original email for some verification; [no big deal] I can replace _DOT_
back with .
. This fails if someone has the email [email protected]
The solution is to use email hash. I prefer md5 at the moment.
So the structure should be:
{
"<md5 hash of '[email protected]'>": {
"EID":"0153"
},
"<md5 hash of '[email protected]'>": {
"EID":"0163"
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With