Skip to content

Commit a2333f1

Browse files
committed
fix
1 parent b48df10 commit a2333f1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

services/auth/oauth2.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ var (
2727

2828
// CheckOAuthAccessToken returns uid of user from oauth token
2929
func CheckOAuthAccessToken(ctx context.Context, accessToken string) int64 {
30+
if !setting.OAuth2.Enabled {
31+
return 0
32+
}
3033
// JWT tokens require a "."
3134
if !strings.Contains(accessToken, ".") {
3235
return 0

0 commit comments

Comments
 (0)