Open zfrantzen opened 3 years ago
Alternatively, a solution may be to return 3 values from API calls, with the new third value indicating if the user should be sent back to login view. The issue with this is that it is only a partial solution as there will still be problems when we automatically timeout the user after a given amount of time.
Currently, when a user is logged out due to inactivity, the runtime environment complains and outputs the error (generated when setting the status code to 403 on the registration page):
This error is likely due to changing views with the service function. Once the service function returns, the calling function may try to do some state changes (like setting the activity spinner to be not visible). Should probably solve this issue, though at the moment it isn't the highest priority as there's minimal effect being more of an edge case. May require refactoring service handling (promises?) throughout the app, so maybe a large time commitment.