Lambda Authorizer Cookies as identity source

0

I am trying to send cookies IdToken but my authorizer is not receiving it. but If I use header.authorization it works. My use case is to validate access token by header.authorization and IdToken sent from browser via cookies.

3 個答案
0

Have you tried providing a token source header as mentioned here - https://docs.aws.amazon.com/apigateway/latest/developerguide/configure-api-gateway-lambda-authorization-with-console.html under point 9a - "Type the name of a header in Token Source. The API client must include a header of this name to send the authorization token to the Lambda authorizer."

profile pictureAWS
專家
已回答 2 年前
0

yes, header.authorization works. but header.cookies does not work.

已回答 2 年前
0

I have the same issue, I believe someone on the internet theorised that the implicit cloudfront in front of your rest api is blocking the cookie header. As far as I know there is no way to fix this for REST apis, the only option seems to be to setup a (regional?) HTTP api instead and use the v2 payload which includes cookie headers. Unfortunately the http api doesn't have some features of the rest api.

Adam
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南