Skip to content

Commit a55b2b5

Browse files
adnaanclaude
andcommitted
fix(auth): clear LiveTemplate session after magic link login
After successful magic link verification, clear the livetemplate-id cookie to force a fresh session state. This ensures the home page shows the correct logged-in state immediately without requiring a page reload. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 7b87dae commit a55b2b5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

internal/kits/system/multi/templates/auth/handler.go.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,9 @@ func (c *{{.StructName}}Controller) HandleMagicLinkVerify(w http.ResponseWriter,
396396
SameSite: http.SameSiteStrictMode,
397397
})
398398

399+
// Clear LiveTemplate session to force fresh state on home page
400+
cookie.ClearLiveTemplateSession(w)
401+
399402
// Redirect to home
400403
http.Redirect(w, r, "/", http.StatusSeeOther)
401404
}

0 commit comments

Comments
 (0)