[server][auth] Print warning and disable password reset and magic links if necessary

This commit is contained in:
Abhishek Shroff
2025-07-16 01:17:05 +05:30
parent fa070841a6
commit 3e74c8a469
7 changed files with 57 additions and 29 deletions

View File

@@ -30,9 +30,11 @@ auth:
# - "*@example.com"
# - "user@example.com"
# - "user*@example.com"
magic_link: true
password:
# backend is one of crypt, ldap, or none
backend: crypt
reset_enabled: true
crypt:
# hash is either argon2 or pbkdf2
hash: argon2

View File

@@ -52,7 +52,6 @@ func SetupCommand() *cobra.Command {
if !Cfg.Debug {
gin.SetMode(gin.ReleaseMode)
}
cmd.Context()
logger := zerolog.Ctx(cmd.Context())
engine := createEngine(logger)
@@ -61,7 +60,7 @@ func SetupCommand() *cobra.Command {
webdav.SetupHandler(r)
logger.Info().Str("path", r.BasePath()).Msg("WebDAV Enabled")
}
apiv1.Setup(engine.Group("/api/v1"))
apiv1.Setup(engine.Group("/api/v1"), logger)
publink.Setup(engine.Group(Cfg.PublinkPath))
setupWebApp(engine, "web")