Skip to content

Fix API issues, add JWT support, improve example templates and docs#67

Merged
mkalioby merged 2 commits intomkalioby:v2.0from
ganiyevuz:v2.0
Mar 28, 2026
Merged

Fix API issues, add JWT support, improve example templates and docs#67
mkalioby merged 2 commits intomkalioby:v2.0from
ganiyevuz:v2.0

Conversation

@ganiyevuz
Copy link
Copy Markdown

Summary

Fixes and improvements for the v2.0 branch:

API fixes

  • RetrieveDestroyAPIViewRetrieveUpdateDestroyAPIView — OpenAPI schema now correctly shows PATCH method
  • Empty PATCH validation — rejects {} with "At least one field must be provided"
  • name field validationmin_length=1 prevents blank passkey names
  • auth_complete_service — catches all exceptions, not just ValueError (prevents 500s from FIDO2 errors)

Example project

  • Added JWT supportrest_framework_simplejwt in INSTALLED_APPS with JWTAuthentication
  • Added SimpleJWT token endpoints/api/auth/token, /api/auth/token/refresh, /api/auth/token/verify
  • Added username+password login APIPOST /api/auth/login returns same token format as passkey auth
  • Added Swagger link to choose.html
  • Fixed toggle PATCH — sends JSON with proper contentType (was sending form data)
  • Fixed XSS in rest/manage.html — .html().text() for user-controlled key name
  • Fixed typos — "Djamgo" → "Django", "Registry" → "Register"
  • Fixed better error handling for duplicate passkey registration (InvalidStateError)
  • Removed search bar and notification bell from navbar

Docs

  • Fixed broken link in README.md (docs.Example.mddocs/Example.md)
  • Fixed broken path in template-setup.md (exmple/testappexample/test_app)

Tests

  • All 52 tests pass
  • 96% coverage

@mkalioby mkalioby merged commit c501b32 into mkalioby:v2.0 Mar 28, 2026
1 check failed
mkalioby pushed a commit that referenced this pull request Mar 28, 2026
)

* Updated coverage.svg

* Fix API issues, add JWT support, improve example templates and docs

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

2 participants