Add authentication, styling needs to be fixed

# Conflicts:
#	starter/ent/runtime.go
#	starter/go.mod
#	starter/go.sum
#	starter/routes/routing.go
This commit is contained in:
Achim Rohn
2026-03-20 20:35:20 +00:00
parent f768e9e47c
commit a15ca501b8
34 changed files with 468 additions and 258 deletions
+3 -2
View File
@@ -1,6 +1,8 @@
package routes
import (
"net/http"
. "git.gorlug.de/code/ersteller"
"git.gorlug.de/code/ersteller/authentication"
google_http "git.gorlug.de/code/ersteller/authentication/google/http"
@@ -13,7 +15,6 @@ import (
"git.gorlug.de/code/ersteller/starter/login"
"git.gorlug.de/code/ersteller/starter/page"
"git.gorlug.de/code/ersteller/starter/todos"
"net/http"
"github.com/gorilla/sessions"
. "maragu.dev/gomponents"
@@ -97,7 +98,7 @@ func CreateApi(environment env.Environment, db *ent.Client) http.Handler {
En: "Login",
De: "Anmelden",
}, loginPaths)
_ = login.NewPage(createPageFunc, server, &loginActivePath)
_ = login.NewPage(createPageFunc, server, &loginActivePath, db, sessionStore)
serverWithMiddleWare := UseMiddleware(server, LoggingMiddleware, MakeGzipHandler,
authentication.Middleware(sessionStore,