We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d25da1 commit a7846abCopy full SHA for a7846ab
oauth2.go
@@ -267,10 +267,16 @@ func (tf *tokenRefresher) Token() (*Token, error) {
267
return nil, errors.New("oauth2: token expired and refresh token is not set")
268
}
269
270
- tk, err := retrieveToken(tf.ctx, tf.conf, url.Values{
+ v := url.Values{
271
"grant_type": {"refresh_token"},
272
"refresh_token": {tf.refreshToken},
273
- })
+ }
274
+
275
+ if len(tf.conf.Scopes) > 0 {
276
+ v.Set("scope", strings.Join(tf.conf.Scopes, " "))
277
278
279
+ tk, err := retrieveToken(tf.ctx, tf.conf, v)
280
281
if err != nil {
282
return nil, err
0 commit comments