serverless / serverless/examples

aws-node-auth0-cognito-custom-authorizers-api issues

Open
#232 8 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
11.5k
Forks
4.4k
Avg merge
2h 55m
Merged PRs (30d)
3

Description

Maybe It's just me but I've got a few issues.

(using Cognito)
Doing the minimum serverless install and changing the iss. I get iss doesn't match. The required trailing slash / is absent in the payload so I have to slice.

jwk.verify(token, pem, { issuer: iss.slice(0, -1) }, (err, decoded) => { // blah }
// instead of
jwk.verify(token, pem, { issuer: iss }, (err, decoded) => { // blah }

And from there, when postmaning, I get 502 Bad Gateway

{
    "message": "Internal server error"
}

AWS testing the auth lambda function works as expected with/out token but testing the API gateway in the mess Execution failed due to configuration error: Malformed Lambda proxy response. And I'm not smart enough to fix that.

Has anyone tested this lately? It's likely I'm just dumb as rocks.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names the aws-node-auth0-cognito-custom-authorizers-api example but no file or test path. Start by installing the example and reproducing the Cognito issuer mismatch and API Gateway request described with Postman; done means the issuer and malformed Lambda proxy response issues no longer occur.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, javascript
Domain
api, authentication, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.