We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85897f9 commit d86433cCopy full SHA for d86433c
services/auth/source/oauth2/init.go
@@ -30,10 +30,14 @@ const ProviderHeaderKey = "gitea-oauth2-provider"
30
31
// Init initializes the oauth source
32
func Init(ctx context.Context) error {
33
- if err := InitSigningKey(); err != nil {
34
- return err
+ // this is for oauth2 provider
+ if setting.OAuth2.Enabled {
35
+ if err := InitSigningKey(); err != nil {
36
+ return err
37
+ }
38
}
39
40
+ // others for oauth2 clients
41
// Lock our mutex
42
gothRWMutex.Lock()
43
0 commit comments