You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a page is left idle for 10 minutes, the access token will expire. If you then attempt to use any of the tables the fia-api requests will fail with an expired token. A refresh event is not triggered because there is no navigation.
We need to create a scigateway event in this scenario.
There are 2 obvious options:
Investigate if an interceptor can be attatched to all fetch requests to detect this behaviour and dispatch the refresh event before retrying the requests
If interceptors are not supported by fetch add axios and replace all fetch calls with axios and define the axios interceptor
Description of the issue
If a page is left idle for 10 minutes, the access token will expire. If you then attempt to use any of the tables the fia-api requests will fail with an expired token. A refresh event is not triggered because there is no navigation.
We need to create a scigateway event in this scenario.
There are 2 obvious options:
fetch
add axios and replace all fetch calls with axios and define the axios interceptorInspiration can be taken from here: https://github.com/ral-facilities/inventory-management-system/blob/a8fc73bd43bc762473e9c558d6fcd894c338d539/src/api/api.tsx#L9
The text was updated successfully, but these errors were encountered: