Skip to content

Commit 687fed1

Browse files
committed
Fix merge
1 parent 7d0e929 commit 687fed1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

routers/web/auth/oauth.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,8 +1062,8 @@ func oAuth2UserLoginCallback(authSource *auth.Source, request *http.Request, res
10621062
gothUser, err := oauth2Source.Callback(request, response)
10631063
if err != nil {
10641064
if err.Error() == "securecookie: the value is too long" || strings.Contains(err.Error(), "Data too long") {
1065-
log.Error("OAuth2 Provider %s returned too long a token. Current max: %d. Either increase the [OAuth2] MAX_TOKEN_LENGTH or reduce the information returned from the OAuth2 provider", loginSource.Name, setting.OAuth2.MaxTokenLength)
1066-
err = fmt.Errorf("OAuth2 Provider %s returned too long a token. Current max: %d. Either increase the [OAuth2] MAX_TOKEN_LENGTH or reduce the information returned from the OAuth2 provider", loginSource.Name, setting.OAuth2.MaxTokenLength)
1065+
log.Error("OAuth2 Provider %s returned too long a token. Current max: %d. Either increase the [OAuth2] MAX_TOKEN_LENGTH or reduce the information returned from the OAuth2 provider", authSource.Name, setting.OAuth2.MaxTokenLength)
1066+
err = fmt.Errorf("OAuth2 Provider %s returned too long a token. Current max: %d. Either increase the [OAuth2] MAX_TOKEN_LENGTH or reduce the information returned from the OAuth2 provider", authSource.Name, setting.OAuth2.MaxTokenLength)
10671067
}
10681068
return nil, goth.User{}, err
10691069
}

0 commit comments

Comments
 (0)