Skip to content

Commit 7cf8b91

Browse files
salmonumbrellasteipete
authored andcommitted
fix(auth): request gmail settings scopes
1 parent 5e55964 commit 7cf8b91

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

internal/googleauth/service.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ var serviceOrder = []Service{
7171
var serviceInfoByService = map[Service]serviceInfo{
7272
ServiceGmail: {
7373
scopes: []string{
74-
"https://mail.google.com/",
74+
"https://www.googleapis.com/auth/gmail.modify",
7575
"https://www.googleapis.com/auth/gmail.settings.basic",
7676
"https://www.googleapis.com/auth/gmail.settings.sharing",
7777
},

internal/googleauth/service_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@ func TestScopesForServices_UnionSorted(t *testing.T) {
189189
}
190190
// Ensure expected scopes are included.
191191
want := []string{
192-
"https://mail.google.com/",
192+
"https://www.googleapis.com/auth/gmail.modify",
193+
"https://www.googleapis.com/auth/gmail.settings.basic",
194+
"https://www.googleapis.com/auth/gmail.settings.sharing",
193195
"https://www.googleapis.com/auth/contacts",
194196
"https://www.googleapis.com/auth/contacts.other.readonly",
195197
"https://www.googleapis.com/auth/directory.readonly",
@@ -241,6 +243,7 @@ func TestScopesForManageWithOptions_Readonly(t *testing.T) {
241243

242244
notWant := []string{
243245
"https://mail.google.com/",
246+
"https://www.googleapis.com/auth/gmail.modify",
244247
"https://www.googleapis.com/auth/gmail.settings.basic",
245248
"https://www.googleapis.com/auth/gmail.settings.sharing",
246249
"https://www.googleapis.com/auth/drive",

0 commit comments

Comments
 (0)