Registry / auth-security / seneca-google-auth

seneca-google-auth

JSON →
library1.0.0jsnpmunverified

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.

npm install seneca-google-auth
INSTALL
IMPORT
SIG · SENECA-GOOGLE-AUTH
S
seneca-google-auth
auth-securityjavascriptv1.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

seneca-google-auth
require('seneca-google-auth')
import senecaGoogleAuth from 'seneca-google-auth'
CJS only; no ES module support.
plugin usage
seneca.use('google-auth', {...})
seneca.use('seneca-google-auth', {...})
Plugin name in seneca.use is 'google-auth', not the package name.
options
seneca.use('google-auth', { clientID: '...', clientSecret: '...', urlhost: '...' })
seneca.use('google-auth', { key: '...', secret: '...' })
Keys must match passport-google-oauth strategy options.

Initializes Seneca with local and Google authentication using environment variables for credentials.

const seneca = require('seneca')({ log: 'silent' }); const senecaAuth = require('seneca-auth'); require('seneca-google-auth'); seneca.use(senecaAuth, { service: { local: {}, google: { clientID: process.env.GOOGLE_CLIENT_ID ?? '', clientSecret: process.env.GOOGLE_CLIENT_SECRET ?? '', urlhost: process.env.HOST ?? 'http://localhost:3000', serviceParams: { scope: ['profile', 'email'] } } } }); seneca.ready(() => { console.log('Google auth plugin ready'); });
Debug
Known issues
deprecatedPackage not updated since 2016; may not work with modern Seneca versions (>3).
fix
Consider alternative auth plugins or upgrade to maintained fork.
affects: >3.x
gotchaPlugin name when using seneca.use is 'google-auth', not 'seneca-google-auth'.
fix
Call seneca.use('google-auth', options).
affects: all
breakingRequires seneca-auth as peer; missing dependency causes silent failures.
fix
Install seneca-auth: npm install seneca-auth.
affects: all
gotchaOptions must include both clientID and clientSecret; missing one results in runtime error.
fix
Provide both clientID and clientSecret in options.
affects: all
gotchaDefault callback URL is /auth/google/callback; if route conflicts, override via callbackUrl option.
fix
Set callbackUrl in options to a unique path.
affects: all
Errors
Common errors & fixes
Error: Cannot find module 'seneca-google-auth'
Package not installed or not in node_modules.
fix
npm install seneca-google-auth
Seneca: Plugin not found: google-auth
Plugin not registered before use.
fix
Ensure require('seneca-google-auth') or require('seneca-google-auth')() before seneca.use.
TypeError: Cannot read properties of undefined (reading 'clientID')
Options object missing clientID property.
fix
Provide clientID in the Google service options.
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
seneca-authrequiredpeer dependency: provides authentication framework
senecarequiredpeer dependency: Seneca microservices toolkit
Agent activity
15 hits · last 30 days
node
12
OpenAI (training)
1
Resources
seneca-google-auth — npm install seneca-google-auth · libregistry