Fix redirect after totp enroll
This commit is contained in:
parent
5adc01baff
commit
cee139e960
1 changed files with 5 additions and 4 deletions
|
|
@ -90,10 +90,6 @@ func TotpEnrollPage(c *fiber.Ctx) error {
|
|||
}
|
||||
|
||||
sess.Set("totp-verified", "yes")
|
||||
err = sess.Save()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
redirectId := c.Query("redirect")
|
||||
redirectUrl := "/"
|
||||
|
|
@ -107,6 +103,11 @@ func TotpEnrollPage(c *fiber.Ctx) error {
|
|||
}
|
||||
}
|
||||
|
||||
err = sess.Save()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return c.Redirect(redirectUrl)
|
||||
} else {
|
||||
mfaError = "Code temporaire invalide"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue