GoogleCloudPlatform / express-oauth2-handlers

Apache License 2.0
22 stars 14 forks source link

@google-cloud/express-oauth2-handlers not detecting required keys from client_secret.json #9

Open sanjaykhobragade opened 5 years ago

sanjaykhobragade commented 5 years ago

I am trying to use @google-cloud/express-oauth2-handlers package in Firebase function to authorize user to then query google APIs.

I provided the required keys in client_secret.json file in root directory of my function/app as per npm instructions for this package, however it's still not detecting the required keys from the client_secret.json file. Its throwing me below error.

firebase deploy --only functions

=== Deploying to 'doppelganger-appl'...

i deploying functions i functions: ensuring necessary APIs are enabled... ✔ functions: all necessary APIs are enabled i functions: preparing functions directory for uploading...

Error: Error occurred while parsing your function triggers.

Error: Missing required keys: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, GOOGLE_CALLBACK_URL, GCP_PROJECT at exports.Provider.Provider.required (/Users//my-doppelganger-app/functions/node_modules/nconf/lib/nconf/provider.js:364:11) at Object. (/Users//my-doppelganger-app/functions/node_modules/@google-cloud/express-oauth2-handlers/config.js:53:7) at Module._compile (internal/modules/cjs/loader.js:776:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10) at Module.load (internal/modules/cjs/loader.js:653:32) at tryModuleLoad (internal/modules/cjs/loader.js:593:12) at Function.Module._load (internal/modules/cjs/loader.js:585:3) at Module.require (internal/modules/cjs/loader.js:690:17) at require (internal/modules/cjs/helpers.js:25:18) at Object. (/Users//my-doppelganger- app/functions/node_modules/@google-cloud/express-oauth2- handlers/tokenStorage.js:17:16)

jdtyler-dev commented 3 years ago

i have the exact same issue. please let me know if you come across anything. im considering trying out the secret manager CL to see if it is able to pass the cross platform authorization between gmail and GCP