{"id":21155,"library":"django-otp-webauthn","title":"django-otp-webauthn","description":"FIDO2 WebAuthn support for django-otp, enabling passkey authentication. Version 0.8.0 requires Python >=3.10 and Django 4.2+. Active development, monthly releases.","status":"active","version":"0.8.0","language":"python","source_language":"en","source_url":"https://github.com/Stormbase/django-otp-webauthn","tags":["django","otp","webauthn","fido2","passkeys","2fa"],"install":[{"cmd":"pip install django-otp-webauthn","lang":"bash","label":"default"}],"dependencies":[{"reason":"Core OTP framework integration","package":"django-otp","optional":false},{"reason":"Django ORM and admin integration","package":"django","optional":false},{"reason":"WebAuthn protocol handling","package":"webauthn","optional":false},{"reason":"Key handling and attestation","package":"cryptography","optional":false}],"imports":[{"note":"Module prefix is django_otp_webauthn, not otp_webauthn","wrong":"from otp_webauthn.models import WebAuthnDevice","symbol":"WebAuthnDevice","correct":"from django_otp_webauthn.models import WebAuthnDevice"},{"note":"Same prefix issue","wrong":"from otp_webauthn.backends import WebAuthnBackend","symbol":"WebAuthnBackend","correct":"from django_otp_webauthn.backends import WebAuthnBackend"}],"quickstart":{"code":"INSTALLED_APPS = [\n    ...\n    'django_otp',\n    'django_otp_webauthn',\n]\n\nAUTHENTICATION_BACKENDS = [\n    'django.contrib.auth.backends.ModelBackend',\n    'django_otp_webauthn.backends.WebAuthnBackend',\n]\n\nOTP_WEBAUTHN_RP_NAME = 'My App'\nOTP_WEBAUTHN_RP_ID = 'example.com'\nOTP_WEBAUTHN_ORIGIN = 'https://example.com'","lang":"python","description":"Minimal setup: add to INSTALLED_APPS, backend, and configure relying party."},"warnings":[{"fix":"Update any direct field references: old_obj.webauthn_key -> old_obj.credential_public_key","message":"Starting from version 0.7.0, the model field 'webauthn_key' was renamed to 'credential_public_key'. This breaks custom code that references the old field name.","severity":"breaking","affected_versions":">=0.7.0"},{"fix":"Replace OTP_WEBAUTHN_ALLOWED_ORIGINS = ['https://example.com'] with OTP_WEBAUTHN_ORIGIN = 'https://example.com'","message":"The setting OTP_WEBAUTHN_ALLOWED_ORIGINS is deprecated in 0.8.0; use OTP_WEBAUTHN_ORIGIN (single string) instead.","severity":"deprecated","affected_versions":"0.8.0"},{"fix":"Always use .get('credential_id') on the response dict, not .credentialID or .get('credentialID')","message":"The 'webauthn' library (not django-otp-webauthn) uses a non-standard field name 'credential_id' in its return dict. When accessing credential data, use 'credential_id' (lowercase) not 'credentialID'.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run manage.py migrate django_otp_webauthn --fake-initial and ensure Django's content types are migrated.","cause":"Migrated from django-otp's old 'user' field to generic foreign key; existing data may be missing the content_type_id.","error":"django_otp_webauthn.models.WebAuthnDevice.user.RelatedObjectDoesNotExist: WebAuthnDevice has no user."},{"fix":"Use: from django_otp_webauthn.backends import WebAuthnBackend (for 0.5.0+), or downgrade if on older version.","cause":"Trying to import from a version <0.5.0 where the backend was named 'WebAuthnBackend' but was later moved to 'WebAuthnAuthenticationBackend'. In 0.5.0+ it's back to 'WebAuthnBackend'.","error":"ImportError: cannot import name 'WebAuthnBackend' from 'django_otp_webauthn.backends'"},{"fix":"OTP_WEBAUTHN_RP_ID = 'example.com' (no scheme or path)","cause":"Setting OTP_WEBAUTHN_RP_ID to a URL like 'https://example.com' instead of just the domain 'example.com'.","error":"ValueError: The 'rp_id' must be a valid domain, not a URL."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}