fix: target named login action
Point the login form at the explicit named action used by the server route. Remove the stale production preview command from the README deployment notes.
This commit is contained in:
@@ -142,10 +142,5 @@ pnpm build
|
||||
pnpm wrangler deploy
|
||||
```
|
||||
|
||||
Preview the built Worker locally:
|
||||
|
||||
```sh
|
||||
pnpm preview
|
||||
```
|
||||
|
||||
Create the first production admin by opening `/login` after migrations have run. The setup form is only shown while the Better Auth `user` table is empty.
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</script>
|
||||
|
||||
<div class={cn("flex flex-col gap-6", className)} bind:this={ref} {...restProps}>
|
||||
<form method="POST" use:enhance>
|
||||
<form action="?/login" method="POST" use:enhance>
|
||||
<Field.Group>
|
||||
<div class="flex flex-col items-center gap-2 text-center">
|
||||
<div class="flex flex-col items-center gap-2 font-medium">
|
||||
|
||||
@@ -95,7 +95,7 @@ export const actions: Actions = {
|
||||
redirect(303, getSafeRedirect(event.url));
|
||||
},
|
||||
|
||||
default: async (event) => {
|
||||
login: async (event) => {
|
||||
const form = await superValidate(event, zod4(loginSchema), { id: 'login' });
|
||||
|
||||
if (!form.valid) {
|
||||
|
||||
Reference in New Issue
Block a user