cookie
parent
17435f56e5
commit
c638dcbaad
|
@ -40,15 +40,9 @@ export default function StoreCalendar() {
|
||||||
<Button
|
<Button
|
||||||
//href={`${Constants.API_ADDRESS}/calendar/auth/google`}
|
//href={`${Constants.API_ADDRESS}/calendar/auth/google`}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
const date = new Date();
|
document.cookie = `session=${getUserSessionFromLocalStorage()}; max-age=${
|
||||||
|
5 * 60
|
||||||
date.setTime(date.getTime() + 5 * 60 * 1000); // 5 minutes
|
}; path=/;`;
|
||||||
|
|
||||||
document.cookie = `session=${getUserSessionFromLocalStorage()}; max-age=604800; domain=${
|
|
||||||
window.location.hostname
|
|
||||||
} path=/;`;
|
|
||||||
|
|
||||||
document.cookie = `token=${getUserSessionFromLocalStorage()}; max-age=604800; path=/;`;
|
|
||||||
|
|
||||||
window.location.href = `${Constants.API_ADDRESS}/calendar/auth/google`;
|
window.location.href = `${Constants.API_ADDRESS}/calendar/auth/google`;
|
||||||
}}
|
}}
|
||||||
|
|
Loading…
Reference in New Issue