Is there interest in a public client API? #32
Replies: 4 comments 1 reply
-
I'm not sure if I understand what you mean. Passkeys are part of WebAuthn and supported by this library? |
Beta Was this translation helpful? Give feedback.
-
Yeah I'm a bit confused by this as well. Which client are we talking about here? Server-to-server won't ever work because the client needs to store or access the keys and that should only happen on the client device during the attestation flow. This is handled by the OS in the case of apps or the browser for websites. There's definitely scope for improving the flow on iOS as I remember there was a fair amount of setup when I built the original prototype but that shouldn't live in this library |
Beta Was this translation helpful? Give feedback.
-
For instance, on tvOS, I'd like to automatically register an account and use it without bugging the user to pull out their phone. Unfortunately, passkeys can't be used for this scenario, since that requires a) the user to have an iCloud account connected to their profile and b) pull out their phone on first launch, which is a bit clunky. For server to server, I guess I meant more of a headless client scenario, where that device could make a key pair and use that as its identifying information. |
Beta Was this translation helpful? Give feedback.
-
As I've been going through the W3C draft and implementing it for my specific use case, I wanted to circle back to see if there was still any ambiguity for the reasoning behind why a client library built in Swift might be useful to folks. I would say it's less about passkeys specifically and more about supporting a compatible key attestation framework for user account registration and authentication in a client-server codebase, specifically when:
I'm sure folks will creatively come up with other use cases, and crucially without inventing new key exchanges which is fraught and should be actively discouraged (ie. by providing tools to use standards-based handshakes instead 😉). Through my implementation, I've identified several key areas that would need to be addressed to properly support a client implementation:
I essentially have three options for moving forward:
I'm very much in favor of option 3, but I'm very much powerless to do it alone, so I'd like to work through any potential issues to make it happen. A very much work-in-progress branch is available here that I'll be fleshing out, cleaning up, and adding test coverage for over the next few days: main...dimitribouniol:webauthn-swift:dimitri/client |
Beta Was this translation helpful? Give feedback.
-
I plan on implementing automatic seamless registration for a project I'm working on, and wanted to build this atop WebAuthn so the server can have a single registration/authentication flow for passkeys as well. Is there appetite for such a public client API to live in this same package (perhaps as a different target/product, though not strictly necessary), essentially providing the functionality
navigator.credentials.create
/navigator.credentials.get
would provide within a browser? I can see this being used both on regular devices, but also server-to-server, not to mention lock-step support for new keys and capabilities.V1 of this API can simply take care of key generation and signing, while custom attestation could be added over time.
(I'll crosspost to Slack as well in case that's a better avenue for discussion, but wanted an excuse to give GH discussions a try 😅)
Beta Was this translation helpful? Give feedback.
All reactions