Fix SameSite cookie value

This commit is contained in:
Sergio R. Caprile
2022-08-26 10:22:31 -03:00
parent ffa033cca9
commit 4a8dd81c93
+2 -2
View File
@@ -69,13 +69,13 @@ const App = function () {
.catch(err => console.log(err));
const login = function (u) {
document.cookie = `access_token=${u.token};path=/;max-age=3600`;
document.cookie = `access_token=${u.token}; Secure, HttpOnly; SameSite=Lax; path=/; max-age=3600`;
setUser(u.user);
return getin();
};
const logout = () => {
document.cookie = `access_token=;path=/;max-age=0`;
document.cookie = `access_token=; Secure, HttpOnly; SameSite=Lax; path=/; max-age=0`;
setUser('');
};