Replace the service-account key file with application-default credentials

This commit is contained in:
Ian Gulliver
2026-08-19 22:27:46 -07:00
parent 0e934e02cd
commit fa86f5913c
8 changed files with 0 additions and 17 deletions
-2
View File
@@ -24,7 +24,6 @@ import (
"google.golang.org/api/drive/v3"
"google.golang.org/api/option"
"heliosian/internal/data"
)
const (
@@ -54,7 +53,6 @@ type Store struct {
func New() (*Store, error) {
service, err := drive.NewService(context.Background(),
option.WithCredentialsFile(data.KeyFile),
option.WithScopes(drive.DriveScope))
if err != nil {
return nil, err
-3
View File
@@ -9,8 +9,6 @@ import (
"google.golang.org/api/sheets/v4"
)
const KeyFile = "creds/service-account.json"
type Sheet struct {
service *sheets.Service
spreadsheets map[string]string
@@ -18,7 +16,6 @@ type Sheet struct {
func NewSheet(spreadsheets map[string]string) (*Sheet, error) {
service, err := sheets.NewService(context.Background(),
option.WithCredentialsFile(KeyFile),
option.WithScopes(sheets.SpreadsheetsScope))
if err != nil {
return nil, err