W3C home > Mailing lists > Public > public-webauthn@w3.org > November 2018

Re: [webauthn] Authenticator disconnect event

From: Emil Lundberg via GitHub <sysbot+gh@w3.org>
Date: Mon, 12 Nov 2018 17:05:38 +0000
To: public-webauthn@w3.org
Message-ID: <issue_comment.created-437957080-1542042336-sysbot+gh@w3.org>
No word on whether we will add something like this, just brainstorming a bit... How about instead exposing this as a Promise on [`PublicKeyCredential`][pkc]? The using code could be something like:

```
navigator.credentials.get(...)
  .then(pkc => {
    verifyWithServer(pkc).then(() => {
      pkc.getDisconnectListener().then(event => {
        logOut();
     });
   });
});
```

I.e., `getDisconnectListener` returns a Promise that resolves when the authenticator that produced `pkc.response` is disconnected (which could be never).

[pkc]: https://w3c.github.io/webauthn/#publickeycredential

-- 
GitHub Notification of comment by emlun
Please view or discuss this issue at https://github.com/w3c/webauthn/issues/1107#issuecomment-437957080 using your GitHub account
Received on Monday, 12 November 2018 17:05:40 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 07:26:35 UTC