graphql-engine/community/boilerplates/auth-webhooks/lambda-cognito
hasura-bot 2bd79ead05 community: fix typo in auth boilerplate
GITHUB_PR_NUMBER: 7633
GITHUB_PR_URL: https://github.com/hasura/graphql-engine/pull/7633

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/2488
Co-authored-by: thephenix4 <69722745+thephenix4@users.noreply.github.com>
GitOrigin-RevId: 87db71c93cd071ef23ed0f877158ecd9a33d454d
2021-11-25 13:04:16 +00:00
..
httpsAsync.js add lambda-cognito webhook example (fix #1180) (#1544) 2019-12-31 14:09:16 +05:30
index.js add lambda-cognito webhook example (fix #1180) (#1544) 2019-12-31 14:09:16 +05:30
myLogger.js add lambda-cognito webhook example (fix #1180) (#1544) 2019-12-31 14:09:16 +05:30
package.json add lambda-cognito webhook example (fix #1180) (#1544) 2019-12-31 14:09:16 +05:30
README.md add lambda-cognito webhook example (fix #1180) (#1544) 2019-12-31 14:09:16 +05:30
tokenDecoder.js community: fix typo in auth boilerplate 2021-11-25 13:04:16 +00:00
tokenExtractor.js add lambda-cognito webhook example (fix #1180) (#1544) 2019-12-31 14:09:16 +05:30

Context

This is a lambda function I wrote that is behind an API gateway. The URL to invoke the lambda is passed to my Hasura instance and the POST method is specified.

This is tested and works. I also pass the encoded JWT from my clients like this

Authorization: Bearer <JWT>

The code has a lot of comments and links.

Deploy

To deploy you will have to add your custom code to populate the headers. Just like the other boiler plates.

Here is a link to deploy an NPM package to lambda.