aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/auth/auth.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/auth/auth.go b/utils/auth/auth.go
index f92e955..82b7353 100644
--- a/utils/auth/auth.go
+++ b/utils/auth/auth.go
@@ -54,6 +54,10 @@ func GetLoginURLWithRedirect(ctx *fiber.Ctx) string {
return config.URL_LOGIN + "?next=" + url.QueryEscape(currentPath)
}
+func GetLoginURLWithNextField(ctx *fiber.Ctx) string {
+ return config.URL_LOGIN + "?next=" + url.QueryEscape(GetRedirectURL(ctx))
+}
+
func GetLogoutURLWithRedirect(ctx *fiber.Ctx) string {
currentPath := ctx.Path()
if queryString := string(ctx.Request().URI().QueryString()); queryString != "" {