Implement redirect to login on session expiration
ArchitectedDev opened this issue · 1 comments
Currently a poor UX when a session expires, multiple notifications will spawn as client-side functionality is not prevented after the first indication of session expiry. Would be good to implement this as a global error handler, however with a brief look into this it appears the javascript SDK may be preventing the buyer/seller apps from regaining control over thrown exceptions. Will need to evaluate further.
Yep this would be good. At one point we were using the Angular SDK and it was working via this refresh token interceptor which would log the user out if it was unable to refresh the token. At some point however we started using the Javascript SDK for which angular interceptors of course did not work.
I think we can implement a similar pattern with the Javascript SDK as it has its own notion of interceptors via axios (underlying http library).
One thing I'd really like to do is clean up all remaining uses of the angular sdk and replace it with the javascript sdk so that we can drop the angular sdk completely. Right now some parts of the app use the javascript sdk and others the angular, it is not ideal.