acm-udayton / acm-udayton/ACM-Meeting-Records
[FEATURE] Swap to JWT Authentication
- Vorherrschende Sprache
- Python
- Sterne
- 7
- Forks
- 2
- Ø Merge
- 4 T. 23 Std.
- Gemergte PRs (30 T.)
- 2
Beschreibung
## Feature Description
Switch authentication to use a JWT instead of the existing session-based approach.
Migrate from `flask-login` to `flask-jwt-extended`. Docs on `flask-jwt-extended` can be found at https://flask-jwt-extended.readthedocs.io/en/stable/
## Why It's Worth Implementing
By converting the application authentication to JWT instead of session-based auth, we switch to a more modern authentication approach and prepare for decoupling of the backend and frontend of the application.
---
## Acceptance Criteria & Solution Requirements
*To close this issue, the following must be met (can be finalized in the comments):*
- [ ] 1. Application runs as expected with the new feature integrated seamlessly.
- [ ] 2. Code quality metrics are maintained, and linting has been considered in development.
- [ ] 3. Testing metrics are maintained, and tests have been updated/added wherever relevant during development.
- [ ] 4. Documentation has been updated to reflect the changes made during development.
- [ ] 5. All backend user authentication has been converted to JWT-based authentication.
- [ ] 6. All admin verification at the route level has been converted to a JWT key `is_admin`
- [ ] 7. JWT creation uses a secret key environment variable separate from the global `SECRET_KEY`
- [ ] 8. Access token JWTs are given a short lifespan (~15 minutes)
- [ ] 9. Refresh token JWTs are given a long lifespan (10 days) to reduce login frequency by refreshing the user's access token (and only the access token, not the refresh token as well) when it expires.
- [ ] 10. Add user management option to revoke JWTs (both access and refresh) from the admin dashboard.
- [ ] 11. Automatically remove expired revoked tokens from the database.
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.