Fix login & mfa flow redirect
This commit is contained in:
parent
647aaa29b0
commit
9efdf085f3
2 changed files with 6 additions and 9 deletions
|
|
@ -45,9 +45,6 @@ func LoginForm(c *fiber.Ctx) error {
|
|||
}
|
||||
|
||||
if helpers.CheckPasswordHash(password, user.Password) {
|
||||
sess.Set("userid", user.ID)
|
||||
sess.Save()
|
||||
|
||||
redirectId := c.Query("redirect")
|
||||
redirectUrl := "/"
|
||||
|
||||
|
|
@ -60,6 +57,9 @@ func LoginForm(c *fiber.Ctx) error {
|
|||
}
|
||||
}
|
||||
|
||||
sess.Set("userid", user.ID)
|
||||
sess.Save()
|
||||
|
||||
return c.Redirect(redirectUrl)
|
||||
} else {
|
||||
loginError = "Email ou mot de passe incorrect"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue