Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

104
Views
Authenticate to google cloud as a service account on browser

I am trying to migrate my google cloud app from Nodejs to native JavaScript, such that it can be run in the browser. However, I can't seem to find any examples of how to authenticate as a service account in the browser. Authenticating in Nodejs looked like this:

const textToSpeech = require('@google-cloud/text-to-speech');
const {Storage} = require('@google-cloud/storage');

const projectId = 'project'
const keyFilename = 'key.json'

const storage = new Storage({projectId, keyFilename});

const client = new textToSpeech.TextToSpeechClient({projectId, keyFilename});

In all of the searching I've done, I've only ever found solutions that use API keys and Client IDs. Additionally, all of these solutions prompt for a user to login, which is not what I want. I'd like to do exactly what the Nodejs code is doing, but in native browser JavaScript.

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!