Skip to content

Conversation

@elfkuzco
Copy link

Rationale

This PR enhances the CMS by adding the functionality required to register/sign in users with a local authentication mechanism (password + username combination)

Changes

  • add password_hash to user model, make id column primary key instead of idp_sub
  • add table for creating/deleting refresh tokens
  • set up local authentication provider on frontend
  • use local tokens for testing

This closes #146

@elfkuzco elfkuzco self-assigned this Feb 10, 2026
@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

❌ Patch coverage is 81.11111% with 34 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.31%. Comparing base (f2d2fe9) to head (65335f9).
⚠️ Report is 5 commits behind head on cms-upgrade.

Files with missing lines Patch % Lines
backend/src/cms_backend/api/routes/auth.py 57.40% 23 Missing ⚠️
backend/src/cms_backend/api/routes/user.py 86.95% 5 Missing and 1 partial ⚠️
backend/src/cms_backend/api/routes/dependencies.py 0.00% 2 Missing ⚠️
backend/src/cms_backend/db/refresh_token.py 93.75% 1 Missing and 1 partial ⚠️
backend/src/cms_backend/api/token.py 95.00% 1 Missing ⚠️
Additional details and impacted files
@@               Coverage Diff               @@
##           cms-upgrade     #151      +/-   ##
===============================================
+ Coverage        79.06%   80.31%   +1.25%     
===============================================
  Files               41       43       +2     
  Lines             1533     1702     +169     
  Branches           139      149      +10     
===============================================
+ Hits              1212     1367     +155     
- Misses             281      291      +10     
- Partials            40       44       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@elfkuzco elfkuzco requested a review from benoit74 February 10, 2026 13:15
@elfkuzco elfkuzco linked an issue Feb 10, 2026 that may be closed by this pull request
Copy link
Contributor

@benoit74 benoit74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I did not performed manual test but it looks very similar to what has been done on Zimfarm so I expect it to be ok, let's merge.

@elfkuzco
Copy link
Author

Going to need #149 review before merging as it's directly based on it because of the migrations they both introduce

@elfkuzco elfkuzco force-pushed the automatically-delete-old-books branch from 11e2c0f to f2d2fe9 Compare February 11, 2026 09:52
Base automatically changed from automatically-delete-old-books to cms-upgrade February 11, 2026 09:55
@elfkuzco elfkuzco merged commit 527cb6b into cms-upgrade Feb 11, 2026
6 checks passed
@elfkuzco elfkuzco deleted the local-sigin branch February 11, 2026 10:12
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.

Add ability to login with local username + password

2 participants