Can I Firebase createUser with arbitrary id instead of email

I am using Firebase for Atlassian Connect AddOn. I want to use Firebase users for data protection.

Users will be identified by the ClientKey provided by Atlassian (maybe after I catch it a bit) - NOT EMAIL software.

Ideally, I don't want to do my own authentication here, as the Firebase.createUser method would suffice if I could provide something other than email, but I can't find anything like it in the documentation.

Is there a way to create Firebase users WITHOUT EMAIL (ID and password only) without going all the way into oAuth and all that jargon to create your own custom authentication?

+3


source to share


1 answer


The Firebase user must have an email. If this is a problem, we cannot use a Firebase "user" but instead a "token" (which must have a UID as part of its payload and therefore behave the same from a security point of view when it reaches its datastore).

If you don't need a password, then instead of "double authenticating and recording feeds" as @Kato kindly pointed out, you can create your own Firebase tokens and serve them to the client.



If you require the user to provide a password, you will need to do your own validation before generating the token and passing it to the client. Since the Firebase user is no longer involved, but rather a token that your privileged server can arbitrarily create and serve, it is your responsibility to ensure that you do this at the right time (that is, when the user has provided your server with the appropriate ID and password).

Read more about Custom Authentication here and tokens .

+4


source







All Articles