graphql-passport

JSON →
library 0.6.8 ·javascript
verified Jun 7, 2026

A library providing a Passport.js strategy (GraphQLLocalStrategy) and context builder utilities for integrating authentication into GraphQL servers (Express + Apollo Server). Version 0.6.8 ships TypeScript types and supports Express 4.x, Passport 0.x, subscriptions-transport-ws 0.x, and ws 7.x / 8.x. It simplifies authenticating users via mutations by wrapping passport.authenticate and passport.login into promises accessible from the GraphQL context, and also supports session-based auth and subscription user resolution. Compared to alternatives like graphql-auth, it directly leverages the Passport.js ecosystem.