Local - Google Auth / Service calls
See original GitHub issueRenderer
- Legacy
- v3
Browser
Edge
Operating System
Windows
What happened?
Hallo,
I followed the Quick Start guide trying to get a local copy of Homebrewery running. This results in an error on startup, since I’ve not configured my localhost to work with Google Docs.
> node server.js
Error: Must pass in a JSON object containing the Google auth settings.
at AuthPlus.fromJSON (C:\homebrewery\node_modules\google-auth-library\build\src\auth\googleauth.js:298:19)
at Object.<anonymous> (C:\homebrewery\server\googleActions.js:13:28)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:94:18)
at Object.<anonymous> (C:\homebrewery\server\homebrew.api.js:6:23)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
Please make sure that a Google Service Account is set up properly in your config files.
server on port: 8000
Additionally, when I try to use the local API to PUT changes to a Brew, I get Gaxios errors:
GaxiosError: Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.
at Gaxios._request (C:\homebrewery\node_modules\gaxios\build\src\gaxios.js:130:23)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Any chance there can be a disabler wrapper around the various Google service calls?
Code
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Using OAuth 2.0 for Server to Server Applications | Authorization
Your application calls Google APIs on behalf of the service account, so users aren't directly involved. This scenario is sometimes called "two-legged OAuth...
Read more >Authentication at Google
Implement user authentication for an application that accesses Google or Google Cloud services and resources. See Authenticate application users for a ...
Read more >Setting up OAuth 2.0 - Google Cloud Platform Console Help
To set up a new service account, click New credentials and then select Service account key. Choose the service account to use for...
Read more >Google APIs Node.js Client - GitHub
Some service support all authentication methods, other may only support one or two. OAuth2 - This allows you to make API calls on...
Read more >Authentication — google-api-core 0.1.0 documentation
If your application is not running on Google Compute Engine, you need a Google Developers Service Account. ... Navigate to APIs & auth...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So in googleActions.js can we just log a different message if there are no
keys
returned after checking config.js?This greatly abbreviates the error message while still making it clear that google drive isn’t setup, but doesn’t lead someone to think they’ve actually made a mistake that needs to be fixed (to run locally).
The current error would still display if there is a service account in config.js which isn’t setup properly…and the full error message would be displayed.
This would be a huge improvement for me personally. I have a PR for this #2528
That would be good, though definitely low priority compared to all the lovely other things you have going on.
I was starting to tinker with making a Visual Studio Code extension that allowed Homebrewery to run inside VSC to see Markdown editing inside that context, and I’ll have enough of my own error messages to triage I’m sure. 😄