Firebase auth onUpdate cloud function for when a user updates their email

前端 未结 1 1617
悲哀的现实
悲哀的现实 2020-11-29 10:04

I need to run a Firebase function whenever my user updates their email address, except auth only has onCreate and onDelete. How can I react to email updates?

相关标签:
1条回答
  • 2020-11-29 10:39

    It's not possible today to directly react to an email address changing in Firebase Authentication. If you'd like to see that as a feature, please file a feature request.

    You can react to it indirectly by having your app listen to authentication events (Android), take the User object delivered to your listener, and write the user's email address to a RealtimeDatabase location (or Firestore document) for that user's UID. Then, you can have a database trigger that tracks the location of your users in the database, and react to the change there.

    0 讨论(0)
提交回复
热议问题