Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIDO2 domain comparison in 'authenticate_begin' #105

Open
maximbelyayev opened this issue Dec 18, 2024 · 0 comments
Open

FIDO2 domain comparison in 'authenticate_begin' #105

maximbelyayev opened this issue Dec 18, 2024 · 0 comments

Comments

@maximbelyayev
Copy link

maximbelyayev commented Dec 18, 2024

Similar to #70:

I have created a FIDO2 passkey, which is saved to Bitwarden and key properties stored in multifactor_userkey table.

When posting to /mfa/multifactor/fido2/begin-auth/, authenticate_begin calls get_user_credentials, which attempts to find UserKey object with properties__domain equal to request.get_host().

I don't know if this is an issue specific to Bitwarden, but the saved FIDO2 key has properties__domain equal to localhost. When working with localhost, the request.get_host() will return the port as well: localhost:8000. This causes a mismatch that doesn't return an AttestedCredentialData object, and Bitwarden states "No passkeys found for this application."

Simply changing the line to properties__domain=request.get_host().split(":")[0] solves the issue and Bitwarden can now find the passkey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant