rwinch / spring-security-webauthn

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Clicking Sign in with a passkey fails

rwinch opened this issue · comments

Using the conditional ui it is possible to sign in. However, clicking Sign in with a passkey fails

Tried on macOS, M1, Sonoma 14.5 with:

  • Chrome, 126.0.6478.127: clicking fails, does not show any UI, and logs Uncaught (in promise) DOMException: A request is already pending. in the console
  • Safari, 17.5: clicking fails, does not show any UI, does not log anything to the console
  • Firefox Developer Edition, 128.0b9: clicking works, shows the passkey selection UI, and login works. However, when the passkey selection UI comes up, an error is logged to the console: Uncaught (in promise) DOMException: The operation was aborted. Diving down it's a NotAllowedError.

This seems to be due to a missing Permission-Policy, see MDN ... Unsure why, though.

It seems adding either Permissions-Policy: identity-credentials-get=* (ref) or Permissions-Policy: publickey-credentials-get=* (ref) fixes the issue.

Hacked with:

.headers(h -> h.addHeaderWriter((request, response) -> {
	response.setHeader("Permissions-Policy", "identity-credentials-get=*");
}))

This has been fixed