Add LoginLink client component that captures current path via usePathname() and passes it as returnTo query param. Update login page to read and sanitize returnTo (open-redirect guard: must start with /, reject //). Update LoginForm to redirect to returnTo after successful login. Wire LandingPage CTA through LoginLink. Add returnTo redirect for already- authed users hitting /login. Add return-URL to flappy page redirect. Remove trailing blank line from (frontend) layout. |
||
|---|---|---|
| .. | ||
| actions.ts | ||
| page.tsx | ||