Skip to content

[refactor->develop] backend auth migrates from jwt to Django sessions#30

Merged
Typogalaxy merged 9 commits into
developfrom
refactor/backend-jwt-to-sessions
Apr 5, 2026
Merged

[refactor->develop] backend auth migrates from jwt to Django sessions#30
Typogalaxy merged 9 commits into
developfrom
refactor/backend-jwt-to-sessions

Conversation

@Typogalaxy
Copy link
Copy Markdown
Member

  • remove djangorestframework-simplejwt package and related logic
  • use login() and logout() provided by django.contrib.auth to manage sessions
  • add UserSession Model to provide a convenient interface for users to inspect their sessions
  • add SessionTrackingMiddleware to add sliding expiration and last_accessed_at feature
  • write a custom authentication backend EmailBackend, because email and password is in two different models
  • add clear_expired_sessions task, which uses django clearsessions command, to clear expired sessions

@Typogalaxy Typogalaxy self-assigned this Apr 5, 2026
@Typogalaxy Typogalaxy merged commit 077aac4 into develop Apr 5, 2026
6 checks passed
@Typogalaxy Typogalaxy deleted the refactor/backend-jwt-to-sessions branch April 5, 2026 13:29
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.

1 participant