AWS使用刷新令牌Javascript [英] AWS Using refresh token Javascript
问题描述
有没有关于如何使用刷新令牌在AWS Cognito上获取新idtoken的示例?
Are there any examples on how to use the refresh token to get a new idtoken on aws cognito?
但随后,它需要开发者凭据。
But then, it requires "developer credentials".
现在我不知道我还需要对我的代码做些什么才能处理这样的开发人员凭证?
Now I don´t know what else do I need to do on my code in order to handle such a developer credential?
这是我收到的消息:
用户:
arn: aws:sts :: 540029582710:assumed-role / Cognito_Skyline_User_Pool_ProdAuth_Role / CognitoIdentityCredentials
无权执行:cognito-idp:
资源上的AdminInitiateAuth:
arn:aws:cognito-idp:ap- northeast-2:540029582710:userpool / ap-northeast-2_7wGKApTQV
"User: arn:aws:sts::540029582710:assumed-role/Cognito_Skyline_User_Pool_ProdAuth_Role/CognitoIdentityCredentials is not authorized to perform: cognito-idp:AdminInitiateAuth on resource: arn:aws:cognito-idp:ap-northeast-2:540029582710:userpool/ap-northeast-2_7wGKApTQV"
谢谢
推荐答案
最后,我需要调用InitiateAuth而不是AdminInitiateAuth
It turned out, in the end, that I needed to call InitiateAuth instead of AdminInitiateAuth
http://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_InitiateAuth.html
这篇关于AWS使用刷新令牌Javascript的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!