Enhance authentication flow: Add authentication-based buttons in AppNavigation for logged-in users, improve member status checks in useAuth, and update join page to automatically redirect to the dashboard after registration. Adjust cookie settings for better development experience.
This commit is contained in:
parent
2ca290d6e0
commit
600fef2b7c
11 changed files with 347 additions and 25 deletions
|
|
@ -1,9 +1,9 @@
|
|||
export default defineEventHandler(async (event) => {
|
||||
// Clear the auth token cookie
|
||||
setCookie(event, 'auth-token', '', {
|
||||
httpOnly: true,
|
||||
secure: process.env.NODE_ENV === 'production',
|
||||
sameSite: 'strict',
|
||||
httpOnly: false, // Match the original cookie settings
|
||||
secure: false, // Don't require HTTPS in development
|
||||
sameSite: 'lax',
|
||||
maxAge: 0 // Expire immediately
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue