Disable changing email in Firebase

nEK*_*N53 5 firebase firebase-authentication

Firebase allows users to change their email client side with

firebase.auth().currentUser.updateEmail("example@example.com")
Run Code Online (Sandbox Code Playgroud)

However, I would like to disable this feature entirely - obviously, I offer no way to access it on my app by default, but if an attacker managed to trick the user into install a Chrome extension or otherwise was able to access client credentials, I would always want it to fail if possible.

Is there anywhere on the Firebase auth console where I can change this functionality or a Cloud function that would stop users from changing their email?

小智 1

此时此刻,我在控制台中没有看到任何内容或以其他方式禁用此功能。目前,只有两个云功能可用于 Firebase Auth 事件 - 用户创建删除,因此这可能也不适用于此用例。我唯一能想到的就是使用 Admin SDK 和您自己的 API/后端来促进此场景的自定义身份验证。