getOpenIdTokenForDeveloperIdentity CALL -> error : These credentials are not valid for accessing this resource
getOpenIdTokenForDeveloperIdentity CALL -> error : These credentials are not valid for accessing this resource
我正在使用 javascript aws cognito
var cognitoidentity = new AWS.CognitoIdentity();
var params = {
IdentityPoolId: 'my IdentityPoolId',
IdentityId: 'my IdentityId',
Logins: { 'cognito-identity.amazonaws.com': token_access }
};
cognitoidentity.getOpenIdTokenForDeveloperIdentity(params, function(err, data) {
console.log('error:', err);
console.log('data:', data);
}
);
对吗?
getOpenIdTokenForDeveloperIdentity 是一种后端方法,您需要从您的服务器使用它,使用具有使用它的权限的 IAM 用户(或在 Lambda 方法中,将有权调用它)
你想在 JS 中使用:AWS.CognitoIdentityCredentials(params)
并在 params.Logins 中使用有效的提供商,例如 Facebook、Twitter,以及您从他们那里取回的令牌。
我正在使用 javascript aws cognito
var cognitoidentity = new AWS.CognitoIdentity();
var params = {
IdentityPoolId: 'my IdentityPoolId',
IdentityId: 'my IdentityId',
Logins: { 'cognito-identity.amazonaws.com': token_access }
};
cognitoidentity.getOpenIdTokenForDeveloperIdentity(params, function(err, data) {
console.log('error:', err);
console.log('data:', data);
}
);
对吗?
getOpenIdTokenForDeveloperIdentity 是一种后端方法,您需要从您的服务器使用它,使用具有使用它的权限的 IAM 用户(或在 Lambda 方法中,将有权调用它)
你想在 JS 中使用:AWS.CognitoIdentityCredentials(params)
并在 params.Logins 中使用有效的提供商,例如 Facebook、Twitter,以及您从他们那里取回的令牌。