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