firebase-admin-python icon indicating copy to clipboard operation
firebase-admin-python copied to clipboard

#678 fixed removing email from userRecord via update_user

Open smithlauren910 opened this issue 1 year ago • 2 comments

Discussion

This PR resolves issue https://github.com/firebase/firebase-admin-python/issues/678.

Testing

Suggestions are welcomed for further testing.

smithlauren910 avatar Dec 11 '23 00:12 smithlauren910

Description of changes: In firebase_admin/_user_mgt.py we changed the email validation in the payload to include the condition that checks whether email should be deleted via DELETE_ATTRIBUTE. Also we wrote the function to delete email from the database upon checking DELETE_ATTRIBUTE.

Description of tests: In tests/test_user_mgt.py we included corresponding fields for email in the function test_update_user_delete_fields. Then we wrote the function test_update_user_delete_provider_and_email that verifies email deletion from the database in the same manner as phone number deletion.

Adeline09 avatar Dec 11 '23 01:12 Adeline09

cc @renkelvin

prameshj avatar Dec 19 '23 18:12 prameshj