Skip to content

Conversation

@Stormheg
Copy link
Member

Refs: #38

@codecov
Copy link

codecov bot commented Oct 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.0%. Comparing base (51b2050) to head (7174f1b).
⚠️ Report is 35 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #96   +/-   ##
=======================================
  Coverage   100.0%   100.0%           
=======================================
  Files          13       13           
  Lines         747      777   +30     
  Branches       65       65           
=======================================
+ Hits          747      777   +30     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Refs: Stormbase#38
This uses the `PublicKeyCredential.signalCurrentUserDetails`
and `PublicKeyCredential.signalAllAcceptedCredentials` browser apis
to 'sync' user details like name and currently registered credentials.

This is useful to stop the browser from suggesting a credential was
removed and to ensure saved information like a username remains
up-to-date.
And update `playwright_force_login` to use it.
To support waiting for multiple messages at the same time.

This code was 90% generated by Copilot.
...during passkey verification through the button.
@Stormheg Stormheg force-pushed the feature/38-use-webauthn-signal-api branch 2 times, most recently from 643e81f to 2a840eb Compare November 22, 2025 16:15
Stormheg added a commit to Stormheg/django-otp-webauthn that referenced this pull request Nov 22, 2025
Stormheg added a commit to Stormheg/django-otp-webauthn that referenced this pull request Nov 22, 2025
@Stormheg Stormheg force-pushed the feature/38-use-webauthn-signal-api branch from 461f2a6 to 4d7af41 Compare November 22, 2025 16:27
@Stormheg Stormheg force-pushed the feature/38-use-webauthn-signal-api branch from 4d7af41 to 39f3153 Compare November 22, 2025 16:34
@Stormheg Stormheg marked this pull request as ready for review November 22, 2025 16:36
@activus-d activus-d self-requested a review November 25, 2025 07:03
Comment on lines +120 to +140
How does this work from a technical perspective?
------------------------------------------------

The ``render_otp_webauthn_sync_signals_scripts`` template tag is a convenience
wrapper that ends up calling the
``PublicKeyCredential.signalAllAcceptedCredentials`` and
``PublicKeyCredential.signalCurrentUserDetails`` WebAuthn browser APIs. It
automatically retrieves a list of currently registered credentials and the
current user details in the format these APIs expect.

For more information about these APIs, refer to the following resources:

- `PublicKeyCredential.signalCurrentUserDetails <https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential/signalCurrentUserDetails_static>`_
- `PublicKeyCredential.signalAllAcceptedCredentials <https://developer.mozilla.org/en-US/docs/Web/API/PublicKeyCredential/signalAllAcceptedCredentials_static>`_

.. note::

As of November 2025, these APIs are still relatively new and don't enjoy
broad support from all browsers. Please see `Web authentication signal
methods on caniuse.com <https://caniuse.com/wf-webauthn-signals>`_ for the
most up-to-date browser support information.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should move this to the Reference section of the docs and link to it here.

Stormheg and others added 2 commits November 25, 2025 15:07
Thank you Damilola for your editing!

Co-authored-by: Damilola Oladele <98895460+activus-d@users.noreply.github.com>
Copy link
Collaborator

@activus-d activus-d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's make this consistent with the preceding headings:

@activus-d activus-d dismissed their stale review November 25, 2025 18:44

I've commited the suggested changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants