fix(frontend): full-page nav for auth links; land on home after login

- Add data-sveltekit-reload to the /login links so the browser performs a full
  navigation (the client router intercepted them and aborted on the external
  Zitadel redirect)
- Default post-login returnTo to / (home) since /explore is not built yet
- 'Empezar gratis' now starts the register flow (/login?mode=register)
This commit is contained in:
2026-07-05 23:16:25 +02:00
parent 5b2f402a9d
commit fe8c2c4244
5 changed files with 11 additions and 5 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ export const GET: RequestHandler = async ({ url, cookies }) => {
const codeVerifier = cookies.get(VERIFIER_COOKIE);
const state = cookies.get(STATE_COOKIE);
const nonce = cookies.get(NONCE_COOKIE);
const returnTo = cookies.get(RETURN_COOKIE) ?? '/explore';
const returnTo = cookies.get(RETURN_COOKIE) ?? '/';
if (!codeVerifier || !state) {
error(400, 'Estado de autenticación inválido. Vuelve a iniciar sesión.');