{"library":"social-auth-express-v2","title":"social-auth-express","type":"library","description":"social-auth-express is a utility built on top of PassportJS that simplifies adding social logins to Express apps. Version 2.0.9 supports 10 social providers (Facebook, Twitter, VK, Instagram, LinkedIn, GitHub, Google, Foursquare, Imgur, Meetup) out of the box. It abstracts Passport's complexity by providing a centralized onAuth callback and pre-parsed profile data, reducing setup time to minutes. It uses Passport strategies internally and requires Express and passport. The package is stable but uses older patterns (require, callback-based).","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install social-auth-express-v2"],"cli":null},"imports":["const SocialAuth = require('social-auth-express');","const socialAuth = new (require('social-auth-express'))({...});","function(req, type, uniqueProperty, accessToken, refreshToken, profile, done) { done(null, user); }"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/social-auth-express-v2","openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"const express = require('express');\nconst app = express();\n\nconst SocialAuth = require('social-auth-express');\nconst socialAuth = new SocialAuth({\n  app: app,\n  url: 'http://127.0.0.1:5000',\n  onAuth: function(req, type, uniqueProperty, accessToken, refreshToken, profile, done) {\n    // Find or create user, then call done\n    done(null, profile);\n  }\n});\n\nsocialAuth.use({\n  facebook: {\n    settings: {\n      clientID: process.env.FACEBOOK_ID || '',\n      clientSecret: process.env.FACEBOOK_SECRET || ''\n    },\n    url: {\n      auth: '/auth/facebook',\n      callback: '/auth/facebook/callback',\n      success: '/',\n      fail: '/auth/facebook/fail'\n    }\n  }\n});\n\napp.listen(5000);","lang":"javascript","description":"Sets up Express with a Facebook login using social-auth-express. Requires environment variables for API keys.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}