Fix session issues

Close #809

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-08-13 17:47:26 +02:00
parent e781fd5b49
commit 5b1ae688d2
4 changed files with 56 additions and 24 deletions

View File

@@ -104,6 +104,11 @@ export async function refreshAccessToken(
const refreshToken = localStorage.getItem(AUTH_REFRESH_TOKEN);
if (!refreshToken) {
console.debug("Refresh token not found");
return false;
}
console.log("Refreshing access token.");
try {
@@ -118,6 +123,7 @@ export async function refreshAccessToken(
return true;
} catch (err) {
console.debug("Failed to refresh token");
return false;
}
}