google / clasp

🔗 Command Line Apps Script Projects
https://developers.google.com/apps-script/guides/clasp
Apache License 2.0
4.53k stars 423 forks source link

Feat : clasp login with service account #950

Open Identity-labs opened 1 year ago

Identity-labs commented 1 year ago

(Note: Non-breaking issues are likely not to be prioritized. Please consider a PR in addition to your issue)

Expected Behavior

Login with clasp with service account key

Actual Behavior

Logging in locally…

Authorizing with the following scopes: https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/script.external_request https://www.googleapis.com/auth/script.webapp.deploy

NOTE: The full list of scopes your project may need can be found at script.google.com under: File > Project Properties > Scopes

Error retrieving access token: TypeError: Cannot destructure property 'client_id' of 'options.creds.installed' as it is undefined.

Steps to Reproduce the Problem

  1. Create service account into GCP
  2. Generate keys & download it
  3. npx @google/clasp login --creds generated-key.json

Specifications