codeforbtv / cvoeo-app

The "Money on My Mind" app helps CVOEO's Reach-Up clients stay on track with their personal finance coaching.
Apache License 2.0
11 stars 4 forks source link

FB function to Create New User #157

Open doub1ejack opened 4 years ago

doub1ejack commented 4 years ago

Ultimately we will combine this function with another function that parses the cvoeo csv. But for now, we can multi-track this work by creating a simple function that takes user information and creates a new firebase account.

We can use the fb.auth api createuserwithemailandpassword to create the user.

Note that we are only initializing an account for a user to register against later. This means we can generate a random password that will never be used. (When a user "registers", they are essentially just using the forgot-password behavior to set the password on their preexisting account to something they know.)

doub1ejack commented 4 years ago

I made a draft PR that creates a new user in firebase with a provided email: https://github.com/codeforbtv/cvoeo-app/pull/183