1610
This commit is contained in:
parent
1e9627e924
commit
f6f4892d09
1 changed files with 4 additions and 5 deletions
|
|
@ -16,12 +16,11 @@ export default async function GUsuarioLoginService(form: any) {
|
||||||
|
|
||||||
cookieStore.set('access_token', response.data.token, {
|
cookieStore.set('access_token', response.data.token, {
|
||||||
httpOnly: true,
|
httpOnly: true,
|
||||||
secure: process.env.NODE_ENV === 'production',
|
secure: false, // ✅ obrigatório para funcionar via HTTP
|
||||||
sameSite: process.env.NODE_ENV === 'production' ? 'none' : 'lax',
|
sameSite: 'lax', // ✅ mais permissivo para o mesmo host
|
||||||
domain: process.env.NODE_ENV === 'production' ? '.saas_app' : undefined,
|
|
||||||
path: '/',
|
path: '/',
|
||||||
maxAge: 60 * 60 * 24,
|
maxAge: 60 * 60 * 24, // 24h
|
||||||
});
|
})
|
||||||
|
|
||||||
redirect('/');
|
redirect('/');
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue