express-oauth2-jwt-bearer
Use when adding Auth0 token validation to Express or Node.js APIs - integrates express-oauth2-jwt-bearer SDK to protect Node.js API endpoints with JWT Bearer authentication, scope-based RBAC, claim validation, and optional DPoP support
Developer Setup
Setup & Installation
npx skills add https://github.com/auth0/agent-skills --skill express-oauth2-jwt-bearernpx skills add https://github.com/auth0/agent-skills --skill express-oauth2-jwt-bearerOverview
What This Skill Does
The `express-oauth2-jwt-bearer` package provides Express middleware for validating Auth0 JWT Bearer access tokens. It handles token extraction, signature verification, audience and issuer validation, and expiry checks per RFC 6750 — letting you focus on business logic rather than JWT parsing. > **Agent instruction:** Before providing SDK setup instructions, fetch the latest release version by running: > ```bash > gh api repos/auth0/node-oauth2-jwt-bearer/releases/latest --jq '.tag_name' > ``` > Use the returned version in all `package.json` dependency lines instead of any hardcoded version below. #
Application
When to use this Skill
- Adding secure Auth0 authentication to a Express oauth2 jwt bearer application
- Implementing standard login, logout, and token authentication flows in Express oauth2 jwt bearer
- Managing user session state and securing frontend/backend routes using Auth0 SDKs
Documentation
Show Skills.md file
Node OAuth2 JWT Bearer Integration
The express-oauth2-jwt-bearer package provides Express middleware for validating Auth0 JWT Bearer access tokens. It handles token extraction, signature verification, audience and issuer validation, and expiry checks per RFC 6750 — letting you focus on business logic rather than JWT parsing.
Agent instruction: Before providing SDK setup instructions, fetch the latest release version by running:
gh api repos/auth0/node-oauth2-jwt-bearer/releases/latest --jq '.tag_name'Use the returned version in all
package.jsondependency lines instead of any hardcoded version below.
Prerequisites
- Node.js 18+ (20+ recommended; required for bootstrap script automation)
- Express 4.x or 5.x
- npm or yarn
- An Auth0 account with a configured API (Resource Server)
- Auth0 CLI (for automatic setup):
npm install -g @auth0/auth0-cli
When NOT to Use
| Use Case | Recommended Skill |
|---|---|
| Building a server-side web app with login UI (Express sessions) | auth0-express |
| Building a Next.js app with server-side auth | auth0-nextjs |
| Building a React/Angular/Vue SPA | auth0-react, auth0-angular, auth0-vue |
Recommendations
Explore other random skills
benchmark
Performance Engineer: baseline page load times, Core Web Vitals, and resource sizes
document-release
Technical Writer: update all project docs to match what you just shipped
retro
Eng Manager weekly retro with per-person breakdowns and shipping streaks