fix(login): pass callbackUrl so local auth redirects to app after sign-in
All checks were successful
PR Checks / lint-test-and-docker-build (pull_request) Successful in 2m15s

After a successful Credentials sign-in, Auth.js was redirecting to its
own built-in /auth/signin page because no callbackUrl was provided.
Add a callbackUrl hidden field (pointing to the app root) so Auth.js
redirects back to the application after local login completes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-22 14:53:45 -05:00
parent 345da2ef7a
commit 348aac996d
2 changed files with 3 additions and 0 deletions

View File

@@ -45,6 +45,7 @@
{#if data.localAuthEnabled}
<form method="POST" action={data.localSigninUrl} class="mt-6 space-y-4">
<input type="hidden" name="csrfToken" />
<input type="hidden" name="callbackUrl" value={data.callbackUrl} />
<div>
<label class="text-sm font-medium text-slate-700" for="identifier">
Username or email