Skip to content

Add support for passkeys to Hypha#4772

Open
frjo wants to merge 14 commits intomainfrom
feature/passkeys
Open

Add support for passkeys to Hypha#4772
frjo wants to merge 14 commits intomainfrom
feature/passkeys

Conversation

@frjo
Copy link
Copy Markdown
Member

@frjo frjo commented Mar 24, 2026

Fixes #4563

This implementation uses duo-labs/py_webauthn: Pythonic WebAuthn directly implementing it own Django wrapper. This is so passkeys are used as a stand alone login method and not as a 2FA option.

The interesting parts are in passkey_views.py and passkeys.js.

Test Steps

  • Test that setting up and logging in with passkeys works on Mac, Windows, iPhone, Android and Linux.
  • Using built in OS support, using usb keys etc.
  • Test that ENFORCE_TWO_FACTOR are bypassed for passkey users. Passkeys are more secure than 2FA.
  • Audit the implementation for any issues.

@frjo frjo added Type: Feature This is something new (not an enhancement of an existing thing). Type: Minor Minor change, used in release drafter labels Mar 24, 2026
@frjo frjo requested a review from wes-otf March 24, 2026 10:17
@wes-otf
Copy link
Copy Markdown
Contributor

wes-otf commented Mar 24, 2026

This is exciting! looking forward to reviewing it in the next day or two!

@frjo frjo force-pushed the feature/passkeys branch from 1fc67c6 to 6a0c0e6 Compare March 27, 2026 14:45
@wes-otf
Copy link
Copy Markdown
Contributor

wes-otf commented Apr 1, 2026

pushing this to test now - is it possible to test locally? getting domain errors trying it on my setup

@frjo
Copy link
Copy Markdown
Member Author

frjo commented Apr 1, 2026

Test build will likely fail due to migration conflict. Fixed it just now in this branch. More migration conflicts will come, the translation PR have a lot migrations e.g.

If we push this to test and then do not merge this in before translate PR we will have to reset the test db a bit.

@frjo
Copy link
Copy Markdown
Member Author

frjo commented Apr 1, 2026

is it possible to test locally?

Yes, if you set base_url to "localhost". Then it will not require TLS either.

IP 127.0.0.1, hypha.test etc. will not work due to how browsers handle this for security.

This should work:

python manage.py runserver_plus localhost:9001

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

Labels

Type: Feature This is something new (not an enhancement of an existing thing). Type: Minor Minor change, used in release drafter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reimplement 2FA to create a smother user flow and add support for passkeys

2 participants