Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #34375 > unrolled thread
| Started by | Richard Maher <maher_rjSPAMLESS@hotmail.com> |
|---|---|
| First post | 2017-11-21 10:06 +0800 |
| Last post | 2017-11-21 10:06 +0800 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.javascript
How to handle Session Expiry in ServiceWorker Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2017-11-21 10:06 +0800
| From | Richard Maher <maher_rjSPAMLESS@hotmail.com> |
|---|---|
| Date | 2017-11-21 10:06 +0800 |
| Subject | How to handle Session Expiry in ServiceWorker |
| Message-ID | <ov01mc$e7q$2@gioia.aioe.org> |
If a Fetch in my ServiceWorker receives a 401 from the server how do I re-authenticate with the server if I have no focused or foregrounded client? NB: I'm talking about POST requests updating the server and not just reading from cache until the network is back. Bring the client back into focus? Scary for user with no action causing that reaction and they may not be there to login again anyway. What does Background-Synch do if it gets a 401? If navigator.credentials was surfaced in a ServiceWorker that would be enough! Sessions that never expire? What are other people doing? Yet again I'm banned from W3C/IETF Github :-( If someone could add the following to ServiceWorker issues that would help: - Please see Use-Case at https://stackoverflow.com/questions/47320790/how-to-handle-session-expiry-in-serviceworker If a User Session has expired, a ServiceWorker currently has no mechanisms available to re-authenticate with the server as there is no heuristic mechanism available for determining credentials. If the credentials.get() was available then re-authentication could take place transparently. If federated (say Google) then if the user had logged out then that state would be honoured.
Back to top | Article view | comp.lang.javascript
csiph-web