mirror of
https://github.com/cesanta/mongoose.git
synced 2025-08-06 13:37:34 +08:00
Merge branch 'master' of github.com:cesanta/mongoose
This commit is contained in:
commit
2d45ba1981
@ -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('');
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user