Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #34375

How to handle Session Expiry in ServiceWorker

Path csiph.com!aioe.org!.POSTED!not-for-mail
From Richard Maher <maher_rjSPAMLESS@hotmail.com>
Newsgroups comp.lang.javascript
Subject How to handle Session Expiry in ServiceWorker
Date Tue, 21 Nov 2017 10:06:06 +0800
Organization Aioe.org NNTP Server
Lines 32
Message-ID <ov01mc$e7q$2@gioia.aioe.org> (permalink)
NNTP-Posting-Host jD1JqOO5t9i/GOBshLHVdQ.user.gioia.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
User-Agent Mozilla/5.0 (Windows NT 10.0; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
X-Notice Filtered by postfilter v. 0.8.2
Content-Language en-US
X-Mozilla-News-Host news://news.aioe.org:119
Xref csiph.com comp.lang.javascript:34375

Show key headers only | View raw


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 comp.lang.javascript | Previous | Next | Find similar | Unroll thread


Thread

How to handle Session Expiry in ServiceWorker Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2017-11-21 10:06 +0800

csiph-web