如何使用Google依赖方禁用用户Firebase? [英] How to use Google relyingparty to disable user Firebase?
本文介绍了如何使用Google依赖方禁用用户Firebase?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想从我的应用程序中禁用Firebase用户,但是Firebase文档只为我提供了删除用户的选项.
I want to disable Firebase users from my app but the Firebase documentation only give me the option to delete users.
我认为解决方案就像创建用户ex: https://www.googleapis.com/identitytoolkit/v3/Dependingparty/signupNewUser?key = [您的密钥]
I think the solution is like create users ex: https://www.googleapis.com/identitytoolkit/v3/relyingparty/signupNewUser?key=[YourKey]
但是没有关于此的文档.
but there is no documentation about this.
推荐答案
Firebase Admin SDK可以禁用用户.
The Firebase Admin SDK has an option to disable users.
请参见此文档,其中包含以下代码样本:
See this the documentation, which contains this code sample:
admin.auth().updateUser(uid, {
email: "modifiedUser@example.com",
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);
});
这篇关于如何使用Google依赖方禁用用户Firebase?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文