Gathering detailed insights and metrics for passport-auth0
Gathering detailed insights and metrics for passport-auth0
Gathering detailed insights and metrics for passport-auth0
Gathering detailed insights and metrics for passport-auth0
passport-linkedin-oauth2
Passport for LinkedIn OAuth2 API v2
@types/passport-auth0
TypeScript definitions for passport-auth0
passport-wsfed-saml2
SAML2 Protocol and WS-Fed library
passport-auth0-openidconnect
Auth0 platform authentication strategy for Passport.js based on OpenID Connect
npm install passport-auth0
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
301 Stars
233 Commits
93 Forks
124 Watchers
10 Branches
78 Contributors
Updated on May 15, 2025
Latest Version
1.4.4
Package Id
passport-auth0@1.4.4
Unpacked Size
69.47 kB
Size
18.62 kB
File Count
28
NPM Version
9.8.1
Node Version
18.18.2
Published on
Oct 30, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
The Auth0 authentication strategy for Passport.js, an authentication middleware for Node.js that can be unobtrusively dropped into any Express-based web application.
:books: Documentation - :rocket: Getting Started - :speech_balloon: Feedback
:information_source: Maintenance Advisory: With the release of https://github.com/auth0/express-openid-connect, we will no longer be adding new features to this library, however we will continue to maintain this library and fix issues. You can read more about the release of our new library at https://auth0.com/blog/auth0-s-express-openid-connect-sdk/
The Auth0 Passport strategy is installed with npm.
npm install passport-auth0
The Auth0 Passport strategy enforces the use of the state
parameter in OAuth 2.0 authorization requests and requires session support in Express to be enabled.
If you require the state
parameter to be omitted (which is not recommended), you can suppress it when calling the Auth0 Passport strategy constructor:
1const Auth0Strategy = require('passport-auth0');
2const strategy = new Auth0Strategy({
3 // ...
4 state: false
5 },
6 function(accessToken, refreshToken, extraParams, profile, done) {
7 // ...
8 }
9);
If you want to change the scope of the ID token provided, add a scope
property to the authenticate configuration passed when defining the route. These must be OIDC standard scopes. If you need data outside of the standard scopes, you can add custom claims to the token.
1app.get( 2 '/login', 3 passport.authenticate('auth0', {scope: 'openid email profile'}), 4 function (req, res) { 5 res.redirect('/'); 6 } 7);
If you want to force a specific identity provider you can use:
1app.get( 2 '/login/google', 3 passport.authenticate('auth0', {connection: 'google-oauth2'}), 4 function (req, res) { 5 res.redirect('/'); 6 } 7);
If you force an identity provider you can also request custom scope from that identity provider:
1app.get( 2 '/login/google', 3 passport.authenticate('auth0', { 4 connection: 'google-oauth2', 5 connection_scope: 'https://www.googleapis.com/auth/analytics, https://www.googleapis.com/auth/contacts.readonly' 6 }), 7 function (req, res) { 8 res.redirect('/'); 9 } 10);
If you want to specify an audience for the returned access_token
you can:
1app.get( 2 '/login', 3 passport.authenticate('auth0', {audience: 'urn:my-api'}), 4 function (req, res) { 5 res.redirect('/'); 6 } 7);
If you want to check authentication without showing a prompt:
1app.get( 2 '/login', 3 passport.authenticate('auth0', {prompt: 'none'}), 4 function (req, res) { 5 res.redirect('/'); 6 } 7);
We appreciate feedback and contribution to this repo! Before you get started, please see the following:
To provide feedback or report a bug, please raise an issue on our issue tracker.
Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.
Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout Why Auth0?
This project is licensed under the MIT license. See the LICENSE file for more info.
No vulnerabilities found.
Reason
all changesets reviewed
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
SAST tool detected
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
4 existing vulnerabilities detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 4
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More