fix: challenge needs to be base64url encoded
This commit is contained in:
parent
db46fcd774
commit
09216e2817
|
@ -213,7 +213,7 @@ func (h *HttpHandler) AccountRegisterChallenge(jc jape.Context) {
|
||||||
|
|
||||||
result := h.portal.Database().Create(&models.S5Challenge{
|
result := h.portal.Database().Create(&models.S5Challenge{
|
||||||
Pubkey: pubkey,
|
Pubkey: pubkey,
|
||||||
Challenge: hex.EncodeToString(challenge),
|
Challenge: base64.RawURLEncoding.EncodeToString(challenge),
|
||||||
Type: "register",
|
Type: "register",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -386,7 +386,7 @@ func (h *HttpHandler) AccountLoginChallenge(jc jape.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
result := h.portal.Database().Create(&models.S5Challenge{
|
result := h.portal.Database().Create(&models.S5Challenge{
|
||||||
Challenge: hex.EncodeToString(challenge),
|
Challenge: base64.RawURLEncoding.EncodeToString(challenge),
|
||||||
Type: "login",
|
Type: "login",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue