Rework login process & implement MFA
This commit is contained in:
parent
d41581aa47
commit
08c8f78328
7 changed files with 297 additions and 56 deletions
|
|
@ -55,17 +55,3 @@ func AuthMiddleware(c *fiber.Ctx) error {
|
|||
|
||||
return c.Next()
|
||||
}
|
||||
|
||||
func DenyAuthMiddleware(c *fiber.Ctx) error {
|
||||
sess, err := helpers.GetSessionStore(c)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
userid := sess.Get("userid")
|
||||
if userid != nil {
|
||||
return fiber.NewError(fiber.StatusForbidden, "Forbidden")
|
||||
}
|
||||
|
||||
return c.Next()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue