Backand.signup() - [建立我的应用程序用户和QUOT;未能履行 [英] Backand.signup() - "Create My App User" failed to perform

查看:187
本文介绍了Backand.signup() - [建立我的应用程序用户和QUOT;未能履行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想注册使用新的用户:

I'm trying to register a new user using:

Backand.signup(firstName, lastName, username, password, password2);

但我最终得到:

POST https://api.backand.com/1/user/signup 504 (GATEWAY_TIMEOUT)

当我检查日志(日志>服务器端的异常),我注意到这个错误:

When I check the logs (Log > Server Side Exceptions), I notice this error:

An unexpected signup exception occured The following action: 
"Create My App User" failed to perform: The operation has timed out 
The operation has timed out Exception has been thrown by the target 
of an invocation. The operation has timed out

我没碰过创建我的应用程序用户的脚本。

I haven't touched the "Create My App User" script.

安全性与;验证>配置>公共应用程序:
打开并设置为用户。我也匿名切换和关闭,并在权限问题的情况下,只读和用户之间进行切换。

Security & Auth > Configuration > Public App: Turned on and set to User. I've also toggled anonymous on and off and switched between ReadOnly and User in case of a permission issue.

这是工作就好几​​个星期前,并几次我能得到一个进入安全性与;验证>注册用户表,但我不能让它在我的应用程序的用户表中创建任何新的项目,甚至在所有的工作了。

It was working just fine a few weeks ago, and a few times I was able to get an entry into the Security & Auth > Registered User's table, but I can't get it to create any new entries in my app's user table or even work at all now.

任何帮助将是AP preciated。

Any help would be appreciated.

推荐答案

根据从创建我的应用程序用户操作返回的服务器方的错误,这是一个安全问题。

Based on the server side error that returned from the "Create My App User" action, this is a security issue.

行动杠杆前端用户权限,并且在此情况下,它要求Anonymus访问将能够更新用户对象

The Action leverage the front-end user permission and, in this case, it requires that Anonymus access will be able to update the users object.

您关闭匿名开关或改变它后错误开始只读的。

The error started after you turned off the anonymous switch or changed it to read-only.

的解决方案是使用管理的许可在服务器端操作。要添加您可以使用基本身份验证授权头管理员权限。

The solution is to use Admin's permission in the server side action. To add the Admin permission you can use the basic auth Authorization header.

更改标题code是这一行:

Change the headers code to be this line:

标题:{'授权':'基本'+ BTOA(用户名+:+密码)}

headers:{'Authorization':'basic ' + btoa (username + ':'+ password) }

因此​​,在创建我的应用程序用户行动新的code应该是这样的:

So the new code in the "Create My App User" Action should look like this:

VAR响应= $ HTTP({
        方法:POST,
        网址:CONSTS.apiUrl +/ 1 /物/用户,
        params:一个{参数:{同步:真正}},
        数据:参数,
        标题:{'授权':'基本'+ BTOA(用户名+:+密码)}
     });

var response = $http({ method: "POST", url:CONSTS.apiUrl + "/1/objects/users", params: {parameters: {"sync": true}}, data: parameters, headers:{'Authorization':'basic ' + btoa (username + ':'+ password) } });

用户名是应用程序主令牌(SECURIT&安培;认证/社会及放大器;键)。

The username is the app master token (Securit & Auth /social &keys).

密码是管理员用户密钥(用户名近队伍/键图标)

The password is the Admin user key (Team / key Icon near the username)

这篇关于Backand.signup() - [建立我的应用程序用户和QUOT;未能履行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆