Social-auth-express is a PassportJS wrapper that simplifies adding social login (Facebook, Twitter, Google, GitHub, LinkedIn, Instagram, VK, Foursquare, Imgur, Meetup, Telegram) to Express apps. Version 1.0.4 stable, low release cadence. Differentiators: centralized onAuth callback, pre-parsed profile data, unique property detection, and minimal boilerplate vs raw PassportJS. Supports ESM via import but primarily CommonJS. No TypeScript types included; requires manual session setup.
npm install social-auth-bxcoreNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Sets up Express with sessions, initializes social-auth-express with Google OAuth, and configures routes.
Install and use express-session (or compatible session middleware) before initializing social-auth-express.
Provide full URL with protocol and port, like 'http://localhost:3000'.
Update constructor call to object syntax: new SocialAuth({ app, url, onAuth }).Explicitly set 'strategy.profileURL' to 'https://graph.facebook.com/v2.6/me' and 'profileFields' as shown in docs.
Use the 'uniqueProperty' argument to dynamically determine which field from 'profile' to use for user identification.
Verify that the callback URL in your provider app (e.g., 'http://localhost:3000/auth/google/callback') matches exactly the 'url.callback' property in socialAuth.use().
Ensure you use 'new SocialAuth({...})' and assign result to a variable before calling .use().Use correct package name 'social-auth-express' and import default: 'import SocialAuth from 'social-auth-express'' or 'const SocialAuth = require('social-auth-express')'.Add session middleware and passport serialization. Example: passport.serializeUser((user, done) => done(null, user));