Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Meteor禁止创建客户端帐户不会阻止创建oAuth帐户_Meteor_Meteor Accounts - Fatal编程技术网

Meteor禁止创建客户端帐户不会阻止创建oAuth帐户

Meteor禁止创建客户端帐户不会阻止创建oAuth帐户,meteor,meteor-accounts,Meteor,Meteor Accounts,在lib中,所以客户端和服务器都可以。重置数据库,然后转到客户端并尝试使用帐户google和useraccounts:core软件包登录。登录成功 预期行为:未找到帐户,登录被拒绝。来自Meteor文档: 禁止ClientAccountCreation布尔值 将拒绝从客户端调用createUser。此外,如果 如果您正在使用帐户ui,则不会显示“创建帐户”链接 可用 Google软件包将通过Meteor.loginWithGoogle创建帐户,这样即使您将“禁止ClientAccountCrea

在lib中,所以客户端和服务器都可以。重置数据库,然后转到客户端并尝试使用帐户google和useraccounts:core软件包登录。登录成功

预期行为:未找到帐户,登录被拒绝。

来自Meteor文档:

禁止ClientAccountCreation布尔值

将拒绝从客户端调用createUser。此外,如果 如果您正在使用帐户ui,则不会显示“创建帐户”链接 可用

Google软件包将通过Meteor.loginWithGoogle创建帐户,这样即使您将“禁止ClientAccountCreation”设置为true,也能正常工作

要全面禁用帐户创建,您可以将onCreateUser函数更改为以下内容:

Accounts.config({
  forbidClientAccountCreation: true
});
Accounts.onCreateUser(function (options, user) {
    throw new Meteor.Error('account_creation_disabled', 'Creation of new accounts is currently disabled');
});