-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Signed Requests with API Gateway Cognito Authorizers #37
Comments
Hi @joshjreed , My understanding of Amazon API Gateway custom authorizer is it takes We've just made a fix to bypass signer if Here is how you can add headers to your API call. Thanks, |
Thanks Richard! One other question I have is, what is the best way to get the authorization token for my header? I've found it by taking the first value listed in Thanks again! |
@joshjreed try something like this:
|
@joshjreed just be sure to make sure you CORS is setup correctly when using this header. If you are using express or something like this with lambda proxy, you would set allowed headers within express options, similar to how the example provided by the awsmobile-cli does. For a SAM example see here: https://github.com/awslabs/aws-serverless-ember/blob/master/cloud/api.yaml#L230 |
@undefobj I'm using the same in below: |
@mghazanfar can you please open a new issue with your app code for assistance |
If anyone facing issue with this I did following to get it fixed |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
First off, I am loving this library so far. I have run into an issue though, and I'm not sure if it's a limitation with the library or something I'm doing incorrectly.
I'd like to make an API.get() call using Amplify to API Gateway and have API Gateway run a Cognito Authorizer on the request. The issue I'm having is, I can't seem to find a way to pass the Cognito Authorizer a valid Authorization Token. The "Authorization" header in the request contains an AWS Signature Version 4 value, which doesn't seem compatible with the Cognito Authorizer.
Am I doing something wrong, or is there a work around for this?
Thanks!
The text was updated successfully, but these errors were encountered: