{"id":18779,"library":"seneca-google-auth","title":"seneca-google-auth","description":"A Seneca.js plugin for Google OAuth2 authentication, used as a service provider with seneca-auth. Version 1.0.0 is the current stable release, last updated in 2016. It wraps PassportJS Google strategy and provides a default action to transform Google login data. Key differentiator: integrates with Seneca microservices framework, allowing custom overrides of user data preparation. Requires seneca-auth and seneca as peer dependencies. No active maintenance, but functional for legacy Seneca applications.","status":"maintenance","version":"1.0.0","language":"javascript","source_language":"en","source_url":"git://github.com/nherment/seneca-google-auth","tags":["javascript","seneca","oauth","auth","google","plugin"],"install":[{"cmd":"npm install seneca-google-auth","lang":"bash","label":"npm"},{"cmd":"yarn add seneca-google-auth","lang":"bash","label":"yarn"},{"cmd":"pnpm add seneca-google-auth","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency: provides authentication framework","package":"seneca-auth","optional":false},{"reason":"peer dependency: Seneca microservices toolkit","package":"seneca","optional":false}],"imports":[{"note":"CJS only; no ES module support.","wrong":"import senecaGoogleAuth from 'seneca-google-auth'","symbol":"seneca-google-auth","correct":"require('seneca-google-auth')"},{"note":"Plugin name in seneca.use is 'google-auth', not the package name.","wrong":"seneca.use('seneca-google-auth', {...})","symbol":"plugin usage","correct":"seneca.use('google-auth', {...})"},{"note":"Keys must match passport-google-oauth strategy options.","wrong":"seneca.use('google-auth', { key: '...', secret: '...' })","symbol":"options","correct":"seneca.use('google-auth', { clientID: '...', clientSecret: '...', urlhost: '...' })"}],"quickstart":{"code":"const seneca = require('seneca')({ log: 'silent' });\nconst senecaAuth = require('seneca-auth');\nrequire('seneca-google-auth');\n\nseneca.use(senecaAuth, {\n  service: {\n    local: {},\n    google: {\n      clientID: process.env.GOOGLE_CLIENT_ID ?? '',\n      clientSecret: process.env.GOOGLE_CLIENT_SECRET ?? '',\n      urlhost: process.env.HOST ?? 'http://localhost:3000',\n      serviceParams: { scope: ['profile', 'email'] }\n    }\n  }\n});\n\nseneca.ready(() => {\n  console.log('Google auth plugin ready');\n});","lang":"javascript","description":"Initializes Seneca with local and Google authentication using environment variables for credentials."},"warnings":[{"fix":"Consider alternative auth plugins or upgrade to maintained fork.","message":"Package not updated since 2016; may not work with modern Seneca versions (>3).","severity":"deprecated","affected_versions":">3.x"},{"fix":"Call seneca.use('google-auth', options).","message":"Plugin name when using seneca.use is 'google-auth', not 'seneca-google-auth'.","severity":"gotcha","affected_versions":"all"},{"fix":"Install seneca-auth: npm install seneca-auth.","message":"Requires seneca-auth as peer; missing dependency causes silent failures.","severity":"breaking","affected_versions":"all"},{"fix":"Provide both clientID and clientSecret in options.","message":"Options must include both clientID and clientSecret; missing one results in runtime error.","severity":"gotcha","affected_versions":"all"},{"fix":"Set callbackUrl in options to a unique path.","message":"Default callback URL is /auth/google/callback; if route conflicts, override via callbackUrl option.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"npm install seneca-google-auth","cause":"Package not installed or not in node_modules.","error":"Error: Cannot find module 'seneca-google-auth'"},{"fix":"Ensure require('seneca-google-auth') or require('seneca-google-auth')() before seneca.use.","cause":"Plugin not registered before use.","error":"Seneca: Plugin not found: google-auth"},{"fix":"Provide clientID in the Google service options.","cause":"Options object missing clientID property.","error":"TypeError: Cannot read properties of undefined (reading 'clientID')"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}