Problem:
When the temp token expires there will be an auth failure in the cljs and the page will reload. This is unnecessary and disruptive to the user, suppose they have models open, or are scrolled to a specific part of the page, or have created temporary items.
When there is an auth failure in the cljs
- make a request to the
refresh-url to authenticate with the session and retrieve a refreshed temporary token
- that is to say, do work equivalent to
validate-token
- update the
auth-token with the new token
- redo the request that failed
- CLJS if it fails again, then give up and do a page reload
Problem:
When the temp token expires there will be an auth failure in the cljs and the page will reload. This is unnecessary and disruptive to the user, suppose they have models open, or are scrolled to a specific part of the page, or have created temporary items.
When there is an auth failure in the cljs
refresh-urlto authenticate with the session and retrieve a refreshed temporary tokenvalidate-tokenauth-tokenwith the new token