fix(auth): use base64 for argon2 hash encoding, matching Authelia format

This commit is contained in:
Claus Lohmar 2026-06-14 17:08:46 +00:00
parent 5953736ddb
commit c68698bd2e

View file

@ -3,7 +3,7 @@ package admin
import (
"crypto/rand"
"database/sql"
"encoding/hex"
"encoding/base64"
"fmt"
"math/big"
@ -220,7 +220,7 @@ func hashPassword(password string) string {
// encodeBase64Raw encodes to raw URL-safe base64 (no padding).
func encodeBase64Raw(data []byte) string {
return hex.EncodeToString(data)
return base64.RawURLEncoding.EncodeToString(data)
}
// GetDB returns the underlying database connection for sync operations.