I\'m Using FirebaseSimpleLogin
to create users and handle authentication.
When I try and create a new user with simple login via the $createUser()
Wouldn't it be easier to just use the security rules to check for it's existence? I have mine set up as follows:
"usernames": {
"$usernameid": {
".read": "auth != null",
".write": "auth != null && (!data.exists() || !newData.exists())"
}
}
This allows the write if the username doesn't exist. I believe I got this directly from the Firebase docs.