You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want a route for the backend to handle user creation. To preserve user privacy (and to avoid phishing accusations from google), we will be more or less passing most request body fields directly to Firebase, our authentication management service of choice. Users will also require a name when creating an account. This information can be stored in mongodb and should map to a user in Firebase.
Request body should require the following fields:
a. name
b. email
c. password
Validate that these fields exist and are properly formatted, then validate that an account with this email does not already exist in our firebase userbase.
Add the user using the firebase admin auth.
Create a schema for storing other user data
Schema should have two fields:
name - holds the user's name given by the request body
_id - every mongodb document has a _id field. Normally this is generated randomly, but we can define it ourselves using the firebaseUID of the user we just created. This way we can query for user data using the uid.
For testing for the PR, printing the uid to the console and showing that it corresponds to a user in our firebase project would be appropriate. However, when you commit your final changes, make sure to remove it, so that google does not accuse us of phishing when we deploy to the staging environment.
The text was updated successfully, but these errors were encountered:
We want a route for the backend to handle user creation. To preserve user privacy (and to avoid phishing accusations from google), we will be more or less passing most request body fields directly to Firebase, our authentication management service of choice. Users will also require a name when creating an account. This information can be stored in mongodb and should map to a user in Firebase.
Documentation for user management
PIA Create User Routes
For your PR:
Create a POST api/users/create route
a. name
b. email
c. password
Create a schema for storing other user data
Schema should have two fields:
_id
field. Normally this is generated randomly, but we can define it ourselves using the firebaseUID of the user we just created. This way we can query for user data using the uid.For testing for the PR, printing the uid to the console and showing that it corresponds to a user in our firebase project would be appropriate. However, when you commit your final changes, make sure to remove it, so that google does not accuse us of phishing when we deploy to the staging environment.
The text was updated successfully, but these errors were encountered: