summaryrefslogtreecommitdiffstats
path: root/modules/auth
diff options
context:
space:
mode:
Diffstat (limited to 'modules/auth')
-rw-r--r--modules/auth/oauth2/oauth2.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/auth/oauth2/oauth2.go b/modules/auth/oauth2/oauth2.go
index 0b18afdaf7..a50c639885 100644
--- a/modules/auth/oauth2/oauth2.go
+++ b/modules/auth/oauth2/oauth2.go
@@ -5,7 +5,6 @@
package oauth2
import (
- "math"
"net/http"
"code.gitea.io/gitea/modules/log"
@@ -26,7 +25,7 @@ import (
"github.com/markbates/goth/providers/openidConnect"
"github.com/markbates/goth/providers/twitter"
"github.com/markbates/goth/providers/yandex"
- "github.com/satori/go.uuid"
+ uuid "github.com/satori/go.uuid"
"xorm.io/xorm"
)
@@ -58,7 +57,7 @@ func Init(x *xorm.Engine) error {
// when using OpenID Connect , since this can contain a large amount of extra information in the id_token
// Note, when using the FilesystemStore only the session.ID is written to a browser cookie, so this is explicit for the storage on disk
- store.MaxLength(math.MaxInt16)
+ store.MaxLength(setting.OAuth2.MaxTokenLength)
gothic.Store = store
gothic.SetState = func(req *http.Request) string {