Securing AWS HTTP APIs with JWT Authorizers

This is for a Lambda HTTPS authorizer.

1 Like

Thanks for reporting that @jakey699! The Content Team will address that soon

1 Like

Howdy, Jake! Thank you for joining the Auth0 community. I apologize for the delayed response. Our team has been at limited capacity during these times.

To better assist you, could you please provide us with reproduction steps to get to the issue. Did you do anything different from what’s outlined in the blog post?

Thank you :slight_smile:

Hi Dan,

I already had my own function which was operating normally without authorisation, so I started at creating a HTTPS endpoint to the Lambda function and going on from there. I didn’t deviate from the instructions.

I’ve since had to create my own custom authoriser to get around whatever was causing the issue - though it’d be great to not have it as it only increases execution time.

Cheers,

Jake

Hey folks, just in case it helps someone, I was hitting the same error as @jakey699 and it was because in the “Issuer URL” field in the API Gateway V2 console, the URL must include a trailing slash. So instead of “https://whatever.us.auth0.com” it needed to be "“https://whatever.us.auth0.com/”. Pretty subtle change, spent way too much time trying to figure out the problem :stuck_out_tongue:

7 Likes

Thanks Eric! That’s just what I needed to know. :+1:

1 Like

This was not hard to get set up! :raised_hands:

However, I’m trying to access authenticated user data, and am currently flummoxed by the way app_metadata is returned. It’s being returned as a string with this format:
map[key1:value1 key2:value2], and is not easily parse-able, as there are no commas, and spaces can be in values and between them. :weary:

Is there a known method for parsing this format to an object?

UPDATE: Never mind. I just had to re-decode the token to get the data in a usable format.

1 Like

Glad you have it figured out!

Thanks Eric! This was the thing, I was missing the trailing slash and was getting exactly the same error message.

1 Like

Glad you have it working now!

Exactly the same problem with “401: unauthorized” when trying to post with a token to add new records. Ended up not having a trailing “/” on the Issuer URL. I checked the tutorial which has this there, but perhaps highlight it too for future readers.

NOTE: Ensure you have the trailing “/” at the end

Many thanks, fantastic tutorial
Jammo

Thanks for sharing it with the rest of community!

I have provided JWT Issuer and Audience as per the instructions in Securing AWS HTTP APIs with JWT Authorizers.
But Still not working.
In Issuer URL also i have provided / at the last. still no luck

I have provided JWT Issuer and Audience as per the instructions in Securing AWS HTTP APIs with JWT Authorizers.
But Still not working.
In Issuer URL also i have provided / at the last. still no luck

Tagging you @dan-auth0 for visibility

John great post, I’m using NestJS, could you help me with getting req.user populated with the user information?

Usually passport would fill that information or is it avaible some other way?

Hey there @Auth0-Content-Team! Can anybody look into that? Thank you!

I’d love to see this article include some references for sample client applications. Specifically using the Auth0 client APIs to obtain and pass JWTs to the this AWS HTTP API.