# Passport.js Authentication Middleware

Node.js authentication middleware with Passport.js and various strategies

> Canonical page: https://test.elysiatools.com/en/samples/passportjs

- **Category:** Authentication & Authorization

- **Keywords:** passportjs, authentication, middleware, nodejs, express, strategies

## Examples

- **Passport.js Local Strategy**: Local username/password authentication with Passport.js
- **Passport.js Google OAuth 2.0**: Google OAuth 2.0 authentication with Passport.js
- **Passport.js JWT Strategy**: JWT authentication with Passport.js for APIs
- **Custom Passport Strategy**: Creating custom authentication strategies with Passport.js

## Related tools

- [Passport Validator](https://test.elysiatools.com/en/tools/passport-validator): Validate passport numbers from different countries (China, USA, Japan, etc.)

## Related content

- [OAuth 2.0 & OpenID Connect Samples](https://test.elysiatools.com/en/samples/oauth-openid-connect): OAuth 2.0 authorization framework and OpenID Connect authentication protocol examples
- [OAuth 2.0 Samples](https://test.elysiatools.com/en/samples/oauth2-samples): OAuth 2.0 implementation examples including authorization flows, client configurations, and security best practices
- [JWT Samples](https://test.elysiatools.com/en/samples/jwt-samples): Comprehensive JWT examples from basic token structure to advanced security implementations
- [Zero Trust Architecture Samples](https://test.elysiatools.com/en/samples/zero-trust-samples): Comprehensive Zero Trust architecture samples covering identity authentication, network segmentation, micro-segmentation strategies, and secure access control
- [Koa Samples](https://test.elysiatools.com/en/samples/koa): Koa Node.js middleware framework examples including middleware chaining, context handling, async/await patterns, and ecosystem integration
- [Casbin Access Control Library](https://test.elysiatools.com/en/samples/casbin): Powerful and efficient open-source access control library
