Merge pull request #13191 from gustavotrott/learning-dashboard-increase-token-timeout

Learning Dashboard: Increase the token expiry time
This commit is contained in:
Anton Georgiev 2021-09-13 17:35:16 -04:00 committed by GitHub
commit 624389f87f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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');
};