refactor: store redirect URI in tinyauth session cookie

This commit is contained in:
Stavros
2025-04-06 20:37:02 +03:00
parent df849d5a5c
commit bd7e160e10
6 changed files with 21 additions and 27 deletions

View File

@@ -2,7 +2,6 @@ package cmd
import (
"errors"
"fmt"
"os"
"strings"
"time"
@@ -94,10 +93,8 @@ var rootCmd = &cobra.Command{
}
// Create handlers config
serverConfig := types.HandlersConfig{
handlersConfig := types.HandlersConfig{
AppURL: config.AppURL,
Domain: fmt.Sprintf(".%s", domain),
CookieSecure: config.CookieSecure,
DisableContinue: config.DisableContinue,
Title: config.Title,
GenericName: config.GenericName,
@@ -141,7 +138,7 @@ var rootCmd = &cobra.Command{
hooks := hooks.NewHooks(auth, providers)
// Create handlers
handlers := handlers.NewHandlers(serverConfig, auth, hooks, providers, docker)
handlers := handlers.NewHandlers(handlersConfig, auth, hooks, providers, docker)
// Create API
api := api.NewAPI(apiConfig, handlers)