[Backend] Set Firebase user email verification status
Closed this issue · 1 comments
dpang314 commented
Description
- When a user is created their email is not verified.
- This is reflected in MongoDB, but not hasn't been implemented with Firebase, which we use for authentication.
Acceptance Criteria
- In
/api/user/user
POST
when a user is created update associated Firebase user to haveemailVerified: false
- in
/api/auth/verify
PATCH
on a successful verification, update the Firebase user to haveemailVerified: true
- in
firebase_storage_rules.txt
restrict both read and write to requirerequest.auth.emailVerified
to be true
Other Notes
thanasis457 commented
In Firebase, emailVerified: false
is the default configuration if verified status is not provided. Either way I added some code to ensure that is is set to false
for new users.