We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b29e10c commit d45a6a0Copy full SHA for d45a6a0
frontend/src/APIClients/BaseAPIClient.ts
@@ -35,6 +35,7 @@ baseAPIClient.interceptors.request.use(async (config: AxiosRequestConfig) => {
35
// Check if the access_token is expired, if it is then request a refresh
36
if (
37
decodedToken &&
38
+ // If it a string (and not an object) then something went wrong
39
(typeof decodedToken === "string" ||
40
// Checks the time of expiration in seconds (division by 1000 because its in ms)
41
decodedToken.exp <= Math.round(new Date().getTime() / 1000))
0 commit comments