fix(jwt): update nonce value in challenge JWT cookie to be a string (#486)
Closes https://github.com/TecharoHQ/anubis/issues/468 Signed-off-by: Jason Cameron <git@jasoncameron.dev>
This commit is contained in:
parent
a0805cad16
commit
2b103a9ec7
2 changed files with 5 additions and 3 deletions
|
|
@ -17,6 +17,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||
|
||||
|
|
@ -344,7 +345,7 @@ func (s *Server) PassChallenge(w http.ResponseWriter, r *http.Request) {
|
|||
// generate JWT cookie
|
||||
token := jwt.NewWithClaims(jwt.SigningMethodEdDSA, jwt.MapClaims{
|
||||
"challenge": challenge,
|
||||
"nonce": nonce,
|
||||
"nonce": nonceStr,
|
||||
"response": response,
|
||||
"iat": time.Now().Unix(),
|
||||
"nbf": time.Now().Add(-1 * time.Minute).Unix(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue