I'm going to save the email and password in a Firebase database, but unfortunately I got this error.
Invalid Firebase path: .com. Firebase paths must not contain '.', '#', '$', '[', or ']'
As could be noticed from the error, Firebase path(key) doesn't allow certain special characters in the path.
While storing email as path, I recommend you to encode the email i.e., replace 'dots' from 'commas'. If you wan't to retrieve, you can decode.
public static String EncodeString(String string) {
return string.replace(".", ",");
}
public static String DecodeString(String string) {
return string.replace(",", ".");
}
Let me know, how it goes for you.
Update
Using UIDs to store user details is better than Email IDs.
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