fix(auth): use base64 for argon2 hash encoding, matching Authelia format
This commit is contained in:
parent
5953736ddb
commit
c68698bd2e
1 changed files with 2 additions and 2 deletions
|
|
@ -3,7 +3,7 @@ package admin
|
||||||
import (
|
import (
|
||||||
"crypto/rand"
|
"crypto/rand"
|
||||||
"database/sql"
|
"database/sql"
|
||||||
"encoding/hex"
|
"encoding/base64"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
|
@ -220,7 +220,7 @@ func hashPassword(password string) string {
|
||||||
|
|
||||||
// encodeBase64Raw encodes to raw URL-safe base64 (no padding).
|
// encodeBase64Raw encodes to raw URL-safe base64 (no padding).
|
||||||
func encodeBase64Raw(data []byte) string {
|
func encodeBase64Raw(data []byte) string {
|
||||||
return hex.EncodeToString(data)
|
return base64.RawURLEncoding.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