3
0

Fix external authentication

goth lib was initialized before settings

Fix #107
This commit is contained in:
Denis Arh
2020-09-02 12:10:05 +02:00
parent 04711ce4ad
commit d6c9bd08fa

View File

@@ -3,7 +3,6 @@ package system
import (
"context"
"github.com/cortezaproject/corteza-server/pkg/automation"
"github.com/go-chi/chi"
_ "github.com/joho/godotenv/autoload"
"github.com/spf13/cobra"
@@ -71,8 +70,6 @@ func (app *App) Initialize(ctx context.Context) (err error) {
return
}
// Initialize external authentication (from default settings)
external.Init()
return
}
@@ -83,6 +80,12 @@ func (app *App) Activate(ctx context.Context) (err error) {
service.Watchers(ctx)
// Initialize external authentication
//
// We're relying on current settings to be loaded at this point so
// we need to run init AFTER service activation
external.Init()
return
}