Skip to content

Commit c0b5d53

Browse files
committed
🐛 Fix issue with OAuth 2.0 scopes in Google Contacts plugin
Due to a bad copy-paste, the OAuth scopes when requesting an access token were incorrect. It shouldn't be an issue with Google APIs, but in case it is, the scopes are now accurate.
1 parent b8e18cc commit c0b5d53

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

plugins/google_contacts/contacts.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"golang.org/x/oauth2/google"
1212
"google.golang.org/api/option"
1313
"google.golang.org/api/people/v1"
14-
"google.golang.org/api/sheets/v4"
1514
)
1615

1716
// A constructor to create a new table instance
@@ -58,7 +57,7 @@ func google_contactsCreator(args rpc.TableCreatorArgs) (rpc.Table, *rpc.Database
5857
ClientID: clientID,
5958
ClientSecret: clientSecret,
6059
Endpoint: google.Endpoint,
61-
Scopes: []string{sheets.SpreadsheetsScope},
60+
Scopes: []string{people.ContactsScope},
6261
}
6362

6463
oauthClient := config.Client(context.Background(), &oauth2.Token{

plugins/google_contacts/contacts_flat.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"golang.org/x/oauth2/google"
1111
"google.golang.org/api/option"
1212
"google.golang.org/api/people/v1"
13-
"google.golang.org/api/sheets/v4"
1413
)
1514

1615
// A constructor to create a new table instance
@@ -57,7 +56,7 @@ func google_contactsFlatCreator(args rpc.TableCreatorArgs) (rpc.Table, *rpc.Data
5756
ClientID: clientID,
5857
ClientSecret: clientSecret,
5958
Endpoint: google.Endpoint,
60-
Scopes: []string{sheets.SpreadsheetsScope},
59+
Scopes: []string{people.ContactsScope},
6160
}
6261

6362
oauthClient := config.Client(context.Background(), &oauth2.Token{

plugins/google_contacts/manifest.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
name = "google_contacts"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
description = "Query your Google Contacts"
55
author = "julien040"
66
license = "UNLICENSED"

0 commit comments

Comments
 (0)