{"_id":"@bitfinex/bfx-facs-auth-google","_rev":"2-910c2ce98f35c2de28363a268f1472e9","name":"@bitfinex/bfx-facs-auth-google","dist-tags":{"latest":"2.0.0"},"versions":{"1.2.3":{"name":"@bitfinex/bfx-facs-auth-google","version":"1.2.3","keywords":["bitfinex","oath"],"author":{"name":"face","email":"rama@bitfinex.com"},"license":"Apache-2.0","_id":"@bitfinex/bfx-facs-auth-google@1.2.3","maintainers":[{"name":"vigan-abd","email":"vigan.abd@gmail.com"},{"name":"bitfinexorg","email":"paolo@bitfinex.com"},{"name":"prdn","email":"paolo.ardoino@gmail.com"},{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"homepage":"https://github.com/bitfinexcom/bfx-facs-auth-google","bugs":{"url":"https://github.com/bitfinexcom/bfx-facs-auth-google/issues"},"dist":{"shasum":"4f4d39055a8525c6dc4921f2dbf5ec8ab59f71e9","tarball":"https://registry.npmjs.org/@bitfinex/bfx-facs-auth-google/-/bfx-facs-auth-google-1.2.3.tgz","fileCount":10,"integrity":"sha512-/ID7fItIBC14PXB43QLoklhHCPIFm9J7Akd7awnkUQwAI5sQmlrpXFb84ihX9apuOu58GjoINK4Js1w6RqpzYg==","signatures":[{"sig":"MEUCIQCem2zNqX0H8szjv9jLidecLU2NDaXpf60TqIUhATGRUgIgK7vnVaCkg0EoWyYMIo/TjXmHwmxAojGCqP6UR+y8cog=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":51510},"main":"index.js","engines":{"node":">=16.0"},"gitHead":"57b7723917e502c40bd72f667a6eeb04da7ebfb6","private":false,"scripts":{"lint":"standard","test":"npm run lint && npm run unit","unit":"mocha","lintFix":"standard --fix index.js","startSimulatedEnviroment":"node test/simulate/simulate-enviroment.js"},"_npmUser":{"name":"vigan-abd","email":"vigan.abd@gmail.com"},"repository":{"url":"git+https://github.com/bitfinexcom/bfx-facs-auth-google.git","type":"git"},"_npmVersion":"10.7.0","description":"Bitfinex Google Oauth Facility","directories":{},"_nodeVersion":"18.20.4","dependencies":{"uuid":"^3.2.1","async":"^2.6.4","lodash":"^4.17.21","googleapis":"^68.0.0","@bitfinex/bfx-facs-base":"git+https://github.com/bitfinexcom/bfx-facs-base.git","@bitfinex/bfx-facs-db-sqlite":"git+https://github.com/bitfinexcom/bfx-facs-db-sqlite.git","@bitfinexcom/lib-js-util-base":"git+https://github.com/bitfinexcom/lib-js-util-base.git"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.2.0","standard":"^17.1.0"},"_npmOperationalInternal":{"tmp":"tmp/bfx-facs-auth-google_1.2.3_1769658699228_0.6492017905834799","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"_id":"@bitfinex/bfx-facs-auth-google@2.0.0","bugs":{"url":"https://github.com/bitfinexcom/bfx-facs-auth-google/issues"},"dist":{"shasum":"6819c006cbcc3e3294dc3ed69ade1ab255dd201b","tarball":"https://registry.npmjs.org/@bitfinex/bfx-facs-auth-google/-/bfx-facs-auth-google-2.0.0.tgz","fileCount":15,"integrity":"sha512-NvUf9Oz+4KeYoHWozecDZINBKAxnc0UAo8FCExYV8G/gSigkHQNgLEHtK0C7WG5R4X/TcBdkYeEvdoGoUcX5ww==","signatures":[{"sig":"MEUCIQCC004dPRIfZPH1igKcAj7MDcJNlg9jam+TFUSPD7p0MQIgGUBwsaMQ8XUtnGKea/opDg6d0FXTUykjwfKZO3VEmMU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCrJu7jPD7PFZMoZ0OI4J5OAZENtYEj4pKWRuJ41omkAAIgORprB7OdBF2bSvBMfrQ8JIHHVnG/AbiMf4I/jyjGwvo="}],"unpackedSize":80089},"main":"index.js","name":"@bitfinex/bfx-facs-auth-google","author":{"name":"face","email":"rama@bitfinex.com"},"engines":{"node":">=16.0"},"gitHead":"268f066fbe5ffe77003ac0230259d0570bf36264","license":"Apache-2.0","private":false,"scripts":{"lint":"standard","test":"npm run lint && npm run unit","unit":"mocha","lintFix":"standard --fix index.js","startSimulatedEnviroment":"node test/simulate/simulate-enviroment.js"},"version":"2.0.0","_npmUser":{"name":"vigan-abd","email":"vigan.abd@gmail.com"},"homepage":"https://github.com/bitfinexcom/bfx-facs-auth-google","keywords":["bitfinex","oath"],"repository":{"url":"git+https://github.com/bitfinexcom/bfx-facs-auth-google.git","type":"git"},"_npmVersion":"11.19.0","description":"Bitfinex Google Oauth Facility","directories":{},"maintainers":[{"name":"vigan-abd","email":"vigan.abd@gmail.com"},{"name":"bitfinexorg","email":"paolo@bitfinex.com"},{"name":"prdn","email":"paolo.ardoino@gmail.com"},{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"_nodeVersion":"24.20.0","dependencies":{"uuid":"^3.2.1","async":"^2.6.4","lodash":"^4.17.21","googleapis":"^68.0.0","@bitfinex/bfx-facs-base":"git+https://github.com/bitfinexcom/bfx-facs-base.git","@bitfinex/lib-js-util-base":"git+https://github.com/bitfinexcom/lib-js-util-base.git","@bitfinex/bfx-facs-db-sqlite":"git+https://github.com/bitfinexcom/bfx-facs-db-sqlite.git"},"_hasShrinkwrap":false,"devDependencies":{"mocha":"^10.2.0","standard":"^17.1.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/bfx-facs-auth-google_2.0.0_1790624661353_0.008287910328563575"}}},"time":{"created":"2026-01-29T03:51:39.073Z","modified":"2026-09-28T19:44:21.637Z","1.2.3":"2026-01-29T03:51:39.393Z","2.0.0":"2026-09-28T19:44:21.460Z"},"bugs":{"url":"https://github.com/bitfinexcom/bfx-facs-auth-google/issues"},"author":{"name":"face","email":"rama@bitfinex.com"},"license":"Apache-2.0","homepage":"https://github.com/bitfinexcom/bfx-facs-auth-google","keywords":["bitfinex","oath"],"repository":{"url":"git+https://github.com/bitfinexcom/bfx-facs-auth-google.git","type":"git"},"description":"Bitfinex Google Oauth Facility","maintainers":[{"name":"vigan-abd","email":"vigan.abd@gmail.com"},{"name":"bitfinexorg","email":"paolo@bitfinex.com"},{"name":"prdn","email":"paolo.ardoino@gmail.com"},{"name":"mafintosh","email":"mathiasbuus@gmail.com"}],"readme":"# bfx-facs-auth-google\n\n### Example configuration\n\n```\n{\n  \"a0\": {\n    \"google\" : {\n      \"clientId\": \"legacy-web-client-id\",\n      \"clientSecret\": \"legacy-web-client-secret\",\n      \"redirectUris\": {\n        \"sso_auth\": \"https://web.example.com/auth/callback\"\n      },\n      \"mobile\": {\n        \"android\": {\n          \"clientId\": \"android-prod-client-id\",\n        },\n        \"ios\": {\n          \"clientId\": \"ios-prod-client-id\",\n        }\n      }\n    },\n    \"ADM_USERS\" : [\n      {\n        \"email\": \"admL1@bitfinex.com\",\n        \"password\": \"example123\",\n        \"level\": 1\n      },\n      {\n        \"email\": \"admL2@bitfinex.com\",\n        \"password\": \"example123\",\n        \"level\": 2\n      },\n      {\n        \"email\": \"google@bitfinex.com\",\n        \"password\": false,\n        \"level\": 0\n      }\n    ]\n  }\n}\n```\n\n### Selecting the right client\n- **Security**: Token `aud` (audience) is the source of truth - `clientKey` is just a hint\n- `clientKey` (optional) can be sent by frontend/mobile to indicate which client to use (e.g. `androidProd`)\n- The backend validates the Google token's `aud` field and maps it to a configured client ID\n- If `clientKey` is provided, it must match the token's `aud` - otherwise request is rejected\n- Resolution order: `aud` match → `clientKey` → `webClient` (from root `google.clientId`)\n","readmeFilename":"README.md"}