mirror of
https://github.com/go-gitea/gitea.git
synced 2024-09-01 14:56:30 +00:00
Don't init oauth if settings have it disabled
This commit is contained in:
parent
3bd87fb170
commit
b1d548b9f0
@ -30,6 +30,11 @@ const ProviderHeaderKey = "gitea-oauth2-provider"
|
|||||||
|
|
||||||
// Init initializes the oauth source
|
// Init initializes the oauth source
|
||||||
func Init(ctx context.Context) error {
|
func Init(ctx context.Context) error {
|
||||||
|
// if oauth is disabled, we don't need to initialize anything
|
||||||
|
if !setting.OAuth2.Enable {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if err := InitSigningKey(); err != nil {
|
if err := InitSigningKey(); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user