commit 1f2f4e4e0aac96077dcbdb2ce40944be2109ef35
parent 0a54d03a8d4546b9cc312d55ab454092b804eedf
Author: n0tr1v <n0tr1v@protonmail.com>
Date: Tue, 6 Jun 2023 12:30:24 -0700
2fa token expires after 2min
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/web/handlers/handlers.go b/pkg/web/handlers/handlers.go
@@ -234,7 +234,7 @@ func protectHomeHandler(c echo.Context) error {
// partialAuthCache keep track of partial auth token -> user id.
// When a user login and have 2fa enabled, we create a "partial" auth cookie.
// The token can be used to complete the 2fa authentication.
-var partialAuthCache = cache.New[PartialAuthItem](10*time.Minute, time.Hour)
+var partialAuthCache = cache.New[PartialAuthItem](2*time.Minute, time.Hour)
type PartialAuthItem struct {
UserID database.UserID