Skip to content

Commit 07ceb9d

Browse files
authored
docs(option): clarify behavior of WithScopes (#1670)
Clarify that when both WithScopes and WithTokenSource are used, the scope settings will be taken from the token source and the WithScopes option will be ignored. Fixes #1644
1 parent 9ea025d commit 07ceb9d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

option/option.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ func (w withEndpoint) Apply(o *internal.DialSettings) {
8282

8383
// WithScopes returns a ClientOption that overrides the default OAuth2 scopes
8484
// to be used for a service.
85+
//
86+
// If both WithScopes and WithTokenSource are used, scope settings from the
87+
// token source will be used instead.
8588
func WithScopes(scope ...string) ClientOption {
8689
return withScopes(scope)
8790
}

0 commit comments

Comments
 (0)