Skip to content

Commit eab3dbf

Browse files
author
Sachin Maheshwari
committed
change refresh token cookie and logout order
1 parent 4445236 commit eab3dbf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

web-assets/js/setupAuth0WithRedirect.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ const authSetup = function () {
106106
const refreshToken = function () {
107107
let d = new Date();
108108
logger('checking token status at: ', `${d.getHours()}::${d.getMinutes()}::${d.getSeconds()} `);
109-
var token = getCookie(tcJWTCookie);
109+
var token = getCookie(v3JWTCookie);
110110
if (!token || isTokenExpired(token)) {
111111
logger('refreshing token... at: ', `${d.getHours()}::${d.getMinutes()}::${d.getSeconds()} `);
112112
try {
@@ -192,9 +192,6 @@ const authSetup = function () {
192192
};
193193

194194
const logout = function () {
195-
auth0.logout({
196-
returnTo: host
197-
});
198195
// TODO
199196
setCookie(tcJWTCookie, "", -1);
200197
setCookie(v3JWTCookie, "", -1);
@@ -206,6 +203,9 @@ const authSetup = function () {
206203
setCookie('auth0Refresh', "", -1);
207204
// for scorecard
208205
setCookie('JSESSIONID', "", -1);
206+
auth0.logout({
207+
returnTo: host
208+
});
209209
};
210210

211211
const isLoggedIn = function () {

0 commit comments

Comments
 (0)