passport

Configure Passport.js local, OAuth, and JWT strategies for Express/Node.js APIs.

Updated Apr 12, 2026
One-click install
npx skills add https://github.com/gil00pita/lanify --skill passport-gil00pita
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: passport
Source: https://github.com/gil00pita/lanify/tree/main/.agents/skills/passport
Command: npx skills add https://github.com/gil00pita/lanify --skill passport-gil00pita

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Passport.js provides a comprehensive authentication middleware for Node.js/Express, enabling centralized, extensible auth with local credentials, OAuth providers, and JWT-based sessions.

Core Features & Use Cases

  • Local strategy for username/password authentication
  • OAuth strategies (Google, GitHub, etc.) for social logins
  • JWT strategy for stateless API authentication
  • Session serialization/deserialization and error handling
  • Account linking between providers and multi-provider sign-in
  • Use cases: securing REST APIs, admin dashboards, and multi-tenant applications

Quick Start

Install, configure, and wire Passport.js with local, OAuth, and JWT strategies to protect routes and manage sessions.

Frequently Asked Questions about passport

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement JWT authentication in an Express API?

To implement JWT authentication in an Express API, use Passport.js with a JWT strategy to secure stateless endpoints. This validates tokens to protect routes without relying on server-side sessions.

What is the best way to add OAuth social login to a Node.js application?

The best way to add OAuth social login to a Node.js application is using Passport.js with OAuth strategies. This enables multi-provider logins from platforms like Google or GitHub through centralized middleware.

Can I link multiple OAuth provider accounts to a single user in Express?

Yes, you can link multiple OAuth provider accounts to a single user in Express. Passport.js supports account linking and multi-provider sign-in to manage centralized authentication across different identity providers.

How do I set up local username and password authentication in Express?

Local username and password authentication in Express is set up using Passport.js with a Local strategy. This handles credential verification, session serialization, and route protection for secure API access.

How does session serialization work with Passport.js strategies?

Session serialization with Passport.js strategies works by managing user login state across requests. It handles serialization and deserialization to maintain sessions, alongside standard error handling for authentication flows.