2019-06-07 02:53:58 +00:00
|
|
|
diff --git a/pkg/api/login_oauth.go b/pkg/api/login_oauth.go
|
2020-02-25 21:38:50 +00:00
|
|
|
index c8c9f05b33..1b5a67aec2 100644
|
2019-06-07 02:53:58 +00:00
|
|
|
--- a/pkg/api/login_oauth.go
|
|
|
|
+++ b/pkg/api/login_oauth.go
|
2020-02-25 21:38:50 +00:00
|
|
|
@@ -134,7 +134,7 @@ func (hs *HTTPServer) OAuthLogin(ctx *m.ReqContext) {
|
2019-06-07 02:53:58 +00:00
|
|
|
oauthCtx := context.WithValue(context.Background(), oauth2.HTTPClient, oauthClient)
|
|
|
|
|
|
|
|
// get token from provider
|
|
|
|
- token, err := connect.Exchange(oauthCtx, code)
|
|
|
|
+ token, err := connect.Exchange(oauthCtx, code, oauth2.AccessTypeOnline)
|
|
|
|
if err != nil {
|
|
|
|
ctx.Handle(500, "login.OAuthLogin(NewTransportWithCode)", err)
|
|
|
|
return
|