![](/img/trans.png)
[英]AWS Amplify Auth with Cognito User Pool not returning nonce or at_hash claim in JWT id_token
[英]chalice-cognito-auth obtained id_token but still getting "User is not authorized"
嘗試使用https://pypi.org/project/chalice-cognito-auth/
我能夠得到 json 響應,例如:
{"id_token":"eyJra...sda",
"refresh_token":"eyJjd...",
"access_token":"eyJraWQiO...",
"token_type":"Bearer"}
但是當我嘗試使用它時
curl -H "Authorization: id_token value ..." http://127.0.0.1:8000/whoami
它回復了
{
"Message": "User is not authorized to access this resource"
}
試試這個, curl -H "Authorization: Bearer id_token" http://127.0.0.1:8000/whoami
即,您錯過了Bearer
關鍵字。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.