fix(auth): use standard base64 (not URL-safe) for argon2 encoding to match Authelia

This commit is contained in:
Claus Lohmar 2026-06-14 17:13:39 +00:00
parent c68698bd2e
commit ed9710d704

View file

@ -218,9 +218,9 @@ func hashPassword(password string) string {
return fmt.Sprintf("$argon2id$v=19$m=65536,t=3,p=4$%s$%s", saltB64, hashB64)
}
// encodeBase64Raw encodes to raw URL-safe base64 (no padding).
// encodeBase64Raw encodes to raw standard base64 (no padding), matching Authelia.
func encodeBase64Raw(data []byte) string {
return base64.RawURLEncoding.EncodeToString(data)
return base64.RawStdEncoding.EncodeToString(data)
}
// GetDB returns the underlying database connection for sync operations.