awslabs / cognito-at-edge

Serverless authentication solution to protect your website or Amplify application
Apache License 2.0
168 stars 54 forks source link

Which headers do we need to pass to make this work? #42

Open ShivamJoker opened 1 year ago

ShivamJoker commented 1 year ago

How can we help?

I want to use this on a ReactNative app to protect my HLS streams, but I can't pass cookies or other headers in there.

So I would like to know exactly what headers I should include in the request to make this work?

unitypark commented 1 year ago

this library is about authenticating your user to be able to access your origin.

either with Cognito Identity or external, your user should be authenticated and this library will issue and return you the tokens which will be saved in your cookie.

You can use either cognito authorizer or your custom authorizer to protect your internal apis or resources in aws.

in this case, send idToken in Header with key of "Authorization" as default, if you did not specify any thing.