Logout user if deleted while session active
This commit is contained in:
parent
9d21929112
commit
ac4c685b6c
1 changed files with 5 additions and 0 deletions
|
|
@ -31,6 +31,11 @@ func AuthMiddleware(c *fiber.Ctx) error {
|
||||||
|
|
||||||
if !active {
|
if !active {
|
||||||
denyAccess = true
|
denyAccess = true
|
||||||
|
|
||||||
|
err = sess.Destroy()
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue