parent
965a8ba3a9
commit
65b057d67c
1 changed files with 2 additions and 4 deletions
|
@ -24,8 +24,7 @@ export const setUser = (user, expiryDate, options = {}) => {
|
||||||
}
|
}
|
||||||
Cookies.set('user', user, {
|
Cookies.set('user', user, {
|
||||||
expires: differenceInDays(expiryDate, new Date()),
|
expires: differenceInDays(expiryDate, new Date()),
|
||||||
sameSite: 'None',
|
sameSite: 'Lax',
|
||||||
secure: true,
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -36,8 +35,7 @@ export const setAuthCredentials = response => {
|
||||||
const expiryDate = getHeaderExpiry(response);
|
const expiryDate = getHeaderExpiry(response);
|
||||||
Cookies.set('auth_data', response.headers, {
|
Cookies.set('auth_data', response.headers, {
|
||||||
expires: differenceInDays(expiryDate, new Date()),
|
expires: differenceInDays(expiryDate, new Date()),
|
||||||
sameSite: 'None',
|
sameSite: 'Lax',
|
||||||
secure: true,
|
|
||||||
});
|
});
|
||||||
setUser(response.data.data, expiryDate);
|
setUser(response.data.data, expiryDate);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue