-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how to use the access token for http api calls to lambdas with cognito authorisers? #127
Comments
Hi, I have finally figured how to do it. After obtaining the access token (or id token), you should send the request with header ref: aws doc |
can any1 please share a project with this warrant library & cognito |
The sample code looks like this: (Thanks to @haoxu13 's answer).
From the ref, you can see that "The ID Token contains claims about the identity of the authenticated user such as name, email, and phone_number.", and "The Access Token grants access to authorized resources". I feel access token is a token mainly used in authorization rather than authentication. To claim who you are, we need to use the id token (I think). (Like access token will be used by server to determine what resources you can actually access) (I might misunderstood, but that's how I feel after reading the ref and associated RFC sections). |
Hi,
Thanks for the library, while manage to obtain a user access token, i failed to understand how to user it with http requests to lambdas that use cognito authorisers.
Thanks
The text was updated successfully, but these errors were encountered: