Add autofocus to username input and change cookie sameSite to lax
This commit is contained in:
@@ -7,14 +7,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<form @submit.prevent="handleSubmit" class="space-y-4">
|
<form @submit.prevent="handleSubmit" class="space-y-4">
|
||||||
<UFormGroup label="Username" name="username">
|
<UFormGroup label="Username" name="username">
|
||||||
<UInput
|
<UInput
|
||||||
v-model="form.username"
|
v-model="form.username"
|
||||||
placeholder="Enter username"
|
placeholder="Enter username"
|
||||||
:disabled="loading"
|
:disabled="loading"
|
||||||
class="w-full"
|
class="w-full"
|
||||||
/>
|
autofocus
|
||||||
</UFormGroup>
|
/>
|
||||||
|
</UFormGroup>
|
||||||
|
|
||||||
<UFormGroup label="Password" name="password">
|
<UFormGroup label="Password" name="password">
|
||||||
<UInput
|
<UInput
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
setCookie(event, 'auth_token', token, {
|
setCookie(event, 'auth_token', token, {
|
||||||
httpOnly: false,
|
httpOnly: false,
|
||||||
secure: process.env.NODE_ENV === 'production',
|
secure: process.env.NODE_ENV === 'production',
|
||||||
sameSite: 'strict',
|
sameSite: 'lax',
|
||||||
maxAge: 7 * 24 * 60 * 60 // 7 days
|
maxAge: 7 * 24 * 60 * 60 // 7 days
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user