From e1303c95d0752884348695a8a1e4930a6c0a08ee Mon Sep 17 00:00:00 2001 From: Thomas Miceli <27960254+thomiceli@users.noreply.github.com> Date: Mon, 19 Feb 2024 02:44:37 +0100 Subject: [PATCH] Increase login for 1 year (#222) --- internal/web/auth.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/web/auth.go b/internal/web/auth.go index c43b6881..afb24275 100644 --- a/internal/web/auth.go +++ b/internal/web/auth.go @@ -6,12 +6,6 @@ import ( "encoding/json" "errors" "fmt" - "github.com/thomiceli/opengist/internal/utils" - "io" - "net/http" - "net/url" - "strings" - "github.com/labstack/echo/v4" "github.com/markbates/goth" "github.com/markbates/goth/gothic" @@ -22,9 +16,14 @@ import ( "github.com/rs/zerolog/log" "github.com/thomiceli/opengist/internal/config" "github.com/thomiceli/opengist/internal/db" + "github.com/thomiceli/opengist/internal/utils" "golang.org/x/text/cases" "golang.org/x/text/language" "gorm.io/gorm" + "io" + "net/http" + "net/url" + "strings" ) const ( @@ -140,6 +139,7 @@ func processLogin(ctx echo.Context) error { } sess.Values["user"] = user.ID + sess.Options.MaxAge = 60 * 60 * 24 * 365 // 1 year saveSession(sess, ctx) deleteCsrfCookie(ctx)