Node.js and TypeScript Tutorial: Secure an Express API

Learn how to use TypeScript and Auth0 to secure a feature-complete Express.js API. Learn how to use Auth0 to implement authorization in Express.
Read more…:

Brought for you by @dan-auth0

3 Likes

How did you like this post? Please share any comments or feedback with us on this thread

1 Like

Anyone else getting an error “getaddrinfo EAI_AGAIN https https:443” when trying to delete, update, or add items?

This topic was automatically closed 27 days after the last reply. New replies are no longer allowed.

I have been following this tutorial:

When I get to the step where I need to configure my WHATABYTE Authentication settings, the application refuses to accept my Auth0 domain claiming it “must be a valid Auth0 domain” and disables the save button. I know my domain is valid as I am currently using it for multiple other applications.

I believe there is a bug in the WHATABYTE form validation for the Auth0 Domain input field. My domain name is of the form x-x-x.auth0.com So possibly the use of dashes in the domain falls outside of the regular expression used for the form validation.

Hey there Michael!

Let me relay it to our content team! Thanks for reporting that!

1 Like

Thanks Konrad,

Could you please reply here or send me a message once a patch gets pushed? I’d love to finish the tutorial.

Sure will let you know once it’s there but as of now there is no ETA for that

1 Like

Thank you for the response, and happy birthday, Konrad!

1 Like

Thanks a lot for the wishes!

1 Like

This topic was automatically closed 27 days after the last reply. New replies are no longer allowed.

I followed this tutorial. I found the steps clear and accurate to produce the intended results. I only had to correct one line in authz.middleware.ts that caused an issue. Line 3 should be:

const { expressjwt: jwt } = require(“express-jwt”); //express-jwt - npm

1 Like

Thank you for reading the blog post and thank you for your feedback!

I’ll be sharing a new API authentication code sample for this stack in the Auth0 Developer Hub very soon:

Thanks for the great tutorial! could you share the code for this tutorial please? (github or gitlab repo)

1 Like

Howdy! Thanks for reading the blog post. I am glad that you liked it. Just to clarify, are you looking for a repo that has the code for the project that we build out throughout the tutorial?

thats correct, I assume you have a repo somewhere for the code of the tutorial?

I have followed everything exactly as stated on the tutorial and getting “Insufficient scope” when logging in as an admin. Can you point me to the right direction please?

We don’t have one yet for we can create one for you :slight_smile: