fix(auth): use standard base64 (not URL-safe) for argon2 encoding to match Authelia
This commit is contained in:
parent
c68698bd2e
commit
ed9710d704
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
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 {
|
func encodeBase64Raw(data []byte) string {
|
||||||
return base64.RawURLEncoding.EncodeToString(data)
|
return base64.RawStdEncoding.EncodeToString(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetDB returns the underlying database connection for sync operations.
|
// GetDB returns the underlying database connection for sync operations.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue