feat: initial wip frontend

This commit is contained in:
Stavros
2026-04-28 19:11:36 +03:00
parent a5677d2558
commit 3971710e87
7 changed files with 158 additions and 12 deletions
+14
View File
@@ -63,6 +63,8 @@ func (m *ContextMiddleware) Middleware() gin.HandlerFunc {
return
}
tlog.App.Trace().Interface("cookies", c.Request.Cookies()).Msg("cookies")
cookie, err := m.auth.GetSessionCookie(c)
if err != nil {
@@ -134,6 +136,18 @@ func (m *ContextMiddleware) Middleware() gin.HandlerFunc {
c.Set("context", &ctx)
c.Next()
return
case "tailscale":
m.auth.RefreshSessionCookie(c)
ctx := m.addTailscaleContext(c, config.UserContext{
Username: cookie.Username,
Name: cookie.Name,
Email: cookie.Email,
Provider: cookie.Provider,
IsLoggedIn: true,
})
c.Set("context", &ctx)
c.Next()
return
default:
_, exists := m.broker.GetService(cookie.Provider)