我正在尝试为我的 Vue 应用程序使用 amplify,但遇到一些问题。
当我通过手动身份验证时Auth.signIn,一切顺利,我获得访问令牌,将其传递到后端并获取我想要的数据。
但我想通过不必构建重置、确认、忘记密码的流程来节省时间,然后我尝试使用Auth.federatedSignIn
当我这样做时,身份验证也工作正常,但是当我传递 accessToken 时,我到达了后端,即抱怨以下内容:
Access Token does not have required scopes
Error executing "GetUser" on "https://cognito-idp.eu-central-1.amazonaws.com"; AWS HTTP error: Client error: `POST https://cognito-idp.eu-central-1.amazonaws.com` resulted in a `400 Bad Request` response:
{"__type":"NotAuthorizedException","message":"Access Token does not have required scopes"}
NotAuthorizedException (client): Access Token does not have required scopes - {"__type":"NotAuthorizedException","message":"Access Token does not have required scopes"}
Run Code Online (Sandbox Code Playgroud)
我如何调用Auth.federatedSignIn()并使我的令牌具有与这些范围完全相同的范围Auth.signIn()?我还需要添加其他参数吗?
我不认为这是我的 PHP/aws-sdk 授权部分,因为当我传递通过Auth.signIn()
这是我目前对放大的论点Amplify.configure()
Error executing "GetUser" on "https://cognito-idp.eu-central-1.amazonaws.com"; AWS HTTP …Run Code Online (Sandbox Code Playgroud) 我是新手,我遇到了ajax自动完成问题,我在Firebug中遇到此错误(在Firefox中):
g.nodeName未定义
c = f.valHooks [g.type] || f.valHooks [g.nodeName.toLowerCase()];
jquery .... min.js(linha 977)
在Chrome中:
未捕获的TypeError:无法调用未定义的方法'toLowerCase'jquery-1.7.2.min.js:977
f.fn.extend.val jquery-1.7.2.min.js:977
$ .autocomplete.source novo:77
a. widget._search jquery-ui-1.8.18.custom.min.js:127
a.widget.search jquery-ui-1.8.18.custom.min.js:127
(匿名函数)
有人可以帮助我,我使用jQuery 1.7.2分钟完成,我按照本教程http://www.jensbits.com/2011/08/24/using-jquery-autocomplete-when-remote-源JSON此结果未包含标签或-值字段/
我的json源代码返回上面的代码:
[{"id":"1","campo":"[1] Empresa Tal"},{"id":"2","campo":"[2] Outra Empresa Tal"},{"id":"3","campo":"[3] Mais Outra Empresa"}]
Run Code Online (Sandbox Code Playgroud)
我的javascript函数:
$('#accadempresa').autocomplete({
source: function(request, response) {
$.ajax({
url: '/ajax.php?action=available&orm=cadempresa&campo=razsoc&valor=' + $(this).val(),
dataType: "json",
data: {term: request.term},
success: function(data) {
response($.map(data, function(item) {
return {
id: item.id,
campo: item.campo
};
}));
}
});
},
minLength: 2,
select: function(event, ui) {
alert('ae');
//$('#state_id').val(ui.item.id); …Run Code Online (Sandbox Code Playgroud)