Skip to content

Commit

Permalink
set cookie opts
Browse files Browse the repository at this point in the history
  • Loading branch information
yunusefendi52 committed Mar 31, 2024
1 parent 32a6b9d commit 5b18b4e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/api/auth/signin.post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ export default defineEventHandler(async (event) => {
name: 'Yunus',
userId: 1,
}, JWT_KEY, {})
setCookie(event, 'app-auth', token)
setCookie(event, 'app-auth', token, {
httpOnly: false,
secure: true,
sameSite: 'lax',
})
return {
ok: true,
}
Expand Down

0 comments on commit 5b18b4e

Please sign in to comment.