Sign in with Apple - Supporting hardware key (YubiKey) based login through WKWebView

I want to support "Sign in with Apple" for my macOS application. Currently, I'm using WKWebview to support this. I'm able to provide a sign in for the current mac user correctly.

But some users try to login with another apple ID, which has FIDO certified keys added as 2FA. Now my WKWebView shows this :

But nothing happens when they click on "Continue". I think I need to create some kind of interface in my application for this case, but no clear idea. I can't see much articles for this use case with security keys.

Anybody has any idea ?

Replies

Additional info: It shows "Could not connect to authorization daemon: The operation couldn’t be completed. The calling process does not have an application identifier. Make sure it is properly configured.." in debugger when clicking on "Continue".

Using WebAuthn (i.e. security keys or passkeys) is only supported for first-party uses in WKWebView. For third-party sign in (e.g. Sign in with Apple), you'll need to use ASWebAuthenticationSession.