Learn how to add OpenID Connect authentication to your Express apps, using our just released express-OpenID-connect SDK

TL;DR: Today, Auth0 announces the release of express-openid-connect, a new Node.js SDK that makes it super easy to add  OpenID Connect authentication to your Express apps. You can  install it using npm today.

Since Auth0 relies on open protocols to expose its features, you can use its services from any platform and app type, without requiring any proprietary SDK. Whenever a platform or a dev stack has a good, well-designed SDK, the  Auth0 Quickstarts simply use that — no need to reinvent the wheel!

When the targeted platform does not have a great experience available, we will often step in and create one. Historically, that’s what we have done for Node.js — a very special platform for us at Auth0, powering our very own authorization server, our extensibility model, and many of our samples.

About eight years ago, we provided an  Auth0 strategy for Passport.js, which has been downloaded more than 2M times and is still going strong. Despite its obvious success, however, our Passport strategy is starting to show its age. For example:

  • It requires more code to initialize and use authentication features than is strictly necessary.
  • It brings significant dependencies into your app, a burden that many developers might want to avoid.
  • It is Auth0 specific, whereas Auth0’s web sign-on function can be easily achieved with pure OpenID Connect.

That’s why we decided to create a new Node.js SDK that is ultra-easy to use, nimble, and standard-based, providing a great experience to Node.js developers, not just when using Auth0, but with any provider that uses OpenID Connect.

Adding Web Sign-On to a Node.js App Really Fast

Before we get into the library’s architecture, let me just give you a quick taste of what it feels like to use express-openid-connect to add web sign on to a Node.js web app.

Adding express-openid-connect to your project is straightforward:

$ npm init -f
$ npm install auth0/express-openid-connect express dotenv

#node #nodejs

Auth0’s Express-OpenID-connect SDK: The Easiest Way to Do Authentication on Node.js
2.15 GEEK