Set dashboard cookie to expire in 30days

This commit is contained in:
Gustavo Trott 2021-09-10 16:18:36 -03:00
parent 04a8d5e359
commit 90c9f61b94

View File

@ -30,7 +30,7 @@ const getLearningDashboardAccessToken = () => ((
const openLearningDashboardUrl = (lang) => {
const cookieExpiresDate = new Date();
cookieExpiresDate.setTime(cookieExpiresDate.getTime() + 3600000);
cookieExpiresDate.setTime(cookieExpiresDate.getTime() + (3600000 * 24 * 30)); // keep cookie 30d
document.cookie = `learningDashboardAccessToken-${Auth.meetingID}=${getLearningDashboardAccessToken()}; expires=${cookieExpiresDate.toGMTString()}; path=/`;
window.open(`/learning-dashboard/?meeting=${Auth.meetingID}&lang=${lang}`, '_blank');
};