我想从我的应用程序中禁用 Firebase 用户,但 Firebase 文档只提供了删除用户的选项。
我认为解决方案就像创建用户一样:https://www.googleapis.com/identitytoolkit/v3/relyingparty/signupNewUser?key=[YourKey] https://www.googleapis.com/identitytoolkit/v3/relyingparty/signupNewUser?key=%5BYourKey%5D
但没有关于此的文档。
Firebase Admin SDK 具有禁用用户的选项。
See 这是文档 https://firebase.google.com/docs/auth/admin/manage-users#update_a_user,其中包含以下代码示例:
admin.auth().updateUser(uid, {
email: "[email protected] /cdn-cgi/l/email-protection",
emailVerified: true,
password: "newPassword",
displayName: "Jane Doe",
photoURL: "http://www.example.com/12345678/photo.png",
disabled: true
})
.then(function(userRecord) {
console.log("Successfully updated user", userRecord.toJSON());
})
.catch(function(error) {
console.log("Error updating user:", error);
});
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)