diff --git a/dataprovider/dataprovider.go b/dataprovider/dataprovider.go index add82d7c..19f197b4 100644 --- a/dataprovider/dataprovider.go +++ b/dataprovider/dataprovider.go @@ -469,6 +469,13 @@ func Initialize(cnf Config, basePath string, checkAdmins bool) error { } else { credentialsDirPath = filepath.Join(basePath, config.CredentialsPath) } + argon2Params = &argon2id.Params{ + Memory: cnf.PasswordHashing.Argon2Options.Memory, + Iterations: cnf.PasswordHashing.Argon2Options.Iterations, + Parallelism: cnf.PasswordHashing.Argon2Options.Parallelism, + SaltLength: 16, + KeyLength: 32, + } if err = validateHooks(); err != nil { return err @@ -477,13 +484,6 @@ func Initialize(cnf Config, basePath string, checkAdmins bool) error { if err != nil { return err } - argon2Params = &argon2id.Params{ - Memory: cnf.PasswordHashing.Argon2Options.Memory, - Iterations: cnf.PasswordHashing.Argon2Options.Iterations, - Parallelism: cnf.PasswordHashing.Argon2Options.Parallelism, - SaltLength: 16, - KeyLength: 32, - } if cnf.UpdateMode == 0 { err = provider.initializeDatabase() if err != nil && err != ErrNoInitRequired {