Dan Brookwell
Dan Brookwell

Reputation: 341

Firebase user signup with email and send them password via email

I'm trying to allow users to sign up to a Firebase website using only their email and phone number. At a later time, I would like to send them their auto-generated password via email. Is this possible to do with Firebase Auth or Realtime Database?

Upvotes: 0

Views: 279

Answers (1)

Frank van Puffelen
Frank van Puffelen

Reputation: 598728

Sure thing. You'll have to create the account through the Admin SDK, so in a trusted environment like your dev machine, a server you control, or Cloud Functions. There you call createUser(...) with the email the user entered, the a temporary password that you made up.

You could do the same client-side, but in that case the password would be determined from the client too, which wouldn't be secure.

Upvotes: 1

Related Questions