Blame 001-login-oauth-use-oauth2-exchange.patch
|
|
1f64cbe |
diff --git a/pkg/api/login_oauth.go b/pkg/api/login_oauth.go
|
|
|
2e8a4f2 |
index c8c9f05b33..1b5a67aec2 100644
|
|
|
1f64cbe |
--- a/pkg/api/login_oauth.go
|
|
|
1f64cbe |
+++ b/pkg/api/login_oauth.go
|
|
|
2e8a4f2 |
@@ -134,7 +134,7 @@ func (hs *HTTPServer) OAuthLogin(ctx *m.ReqContext) {
|
|
|
1f64cbe |
oauthCtx := context.WithValue(context.Background(), oauth2.HTTPClient, oauthClient)
|
|
|
1f64cbe |
|
|
|
1f64cbe |
// get token from provider
|
|
|
1f64cbe |
- token, err := connect.Exchange(oauthCtx, code)
|
|
|
1f64cbe |
+ token, err := connect.Exchange(oauthCtx, code, oauth2.AccessTypeOnline)
|
|
|
1f64cbe |
if err != nil {
|
|
|
1f64cbe |
ctx.Handle(500, "login.OAuthLogin(NewTransportWithCode)", err)
|
|
|
1f64cbe |
return
|