Firebase detect email verification

心不动则不痛 提交于 2021-01-29 08:00:55

问题


When a user verifies their email address, I want to receive some notification on my client app (iOS/Android).

I need this to ensure that I can unlock additional capabilities for those users whose address is verified. How can I achieve this?

Currently, the only way to do this is to call the reload method on the User object. However, it is not an ideal way of dealing with this situation – after all, I have no idea when they would click on the link. So, performing a reload every time my app becomes active seems excessive.

Maybe there is a trigger which I missed?


回答1:


Well, what I do is, each app launch I query the user object for its verification status; if it's not verified I send a verif request right there, if not sent before, and if it is and it's the first time, I show some thank you text and move on. I don't think there's an actual notification you can hook with for when the user clicks the link in the email, but alternatively you could build an admin node function server side to check every now and then for verifications and send pushes to the relevant devices.



来源:https://stackoverflow.com/questions/55328396/firebase-detect-email-verification

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!