1

我正在尝试使用以下方法注册新用户:

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

但我最终得到:

XMLHttpRequest cannot load https://api.backand.com/1/user/signup. 
No 'Access-Control-Allow-Origin' header is present on the 
requested resource. Origin 'http://localhost:8100' is therefore 
not allowed access. 
The response had HTTP status code 504.

使用此设置时,此端点始终可以正常工作,但今天似乎停止工作。AFAIK,我在这个 url “ https://api.backand.com/ ”上点击了我的所有端点,做 GET、PUT、POST 等,它们都按预期工作。这是唯一显示这种行为的。

除了/1/user/signup

任何帮助,将不胜感激。

4

1 回答 1

1

正如您在 github 中的 Backand sdk 代码中看到

注册功能接受电子邮件而不是用户名。

是代码:

self.signup = function (firstName, lastName, email, password,confirmPassword, parameters) {
        return BackandAuthService.signup(firstName, lastName, email,
                              password, confirmPassword, parameters);
};

因此,请确保您发送电子邮件而不是简单的用户名。

另一个问题可能是您发送的密码少于 6 个字符。

您可以在 chrome 的网络选项卡中找到详细的错误。

于 2016-03-23T12:28:02.723 回答