master
alex 2024-01-14 20:41:31 +01:00
parent 17435f56e5
commit c638dcbaad
1 changed files with 3 additions and 9 deletions

View File

@ -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`;
}} }}