✨ feat(auth): add logout and re-authentication functionality - #115
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
🚨 Remaining Issues1. CLI ignores Right now a user running 2. The docs correctly recommend interactive prompting, but there's no guard for 3. Minor: test docstring typo (Cosmetic)
✅ Positive Observations
🎯 Action ItemsMust Fix: None blocking — all critical/high items from the prior review are resolved. Should Fix: Propagate Consider: Add a non-interactive/TTY guard for |
|
All three previously identified issues are now resolved, and the fixes are implemented cleanly with no new problems introduced. Verification of Previously Known Issues
Supporting test coverage confirms each fix behaves correctly: Design Quality CheckThe No new critical, high, or medium-severity issues surfaced in this revision. 📋 Review SummaryPR #115 — feat(auth): add logout and re-authentication functionality This PR adds Recommendation: ✅ Approve — ready to merge. |
- Implement logout to remove session and key files - Add force_login to refresh credentials - Introduce --logout and --reauth CLI flags - Add --purge-key to fully clear auth data
- verify session and key file deletion on logout - test purge_key functionality during logout - ensure force_login discards stored sessions
- Add CLI flags for logout and re-authentication - Explain session file and key management - Update troubleshooting guide for 401 errors
- Remove manual cookie clear in force_login - Rely on logout() to handle session cleanup - Simplify docstring for clarity
- verify in-memory cookies are cleared on logout - ensure logout handles session file unlink failures
- Prevent confusion by warning --purge-key is ignored - Update docstring for _handle_auth_command behavior - Add test case for the warning and reauth flow
- Warn against passing passwords via CLI arguments - Clarify --purge-key behavior with --reauth - Recommend interactive password prompts
- Use GitHub caution alerts for better visibility - Standardize security warnings across documentation
- Introduce SessionLogoutError for FS failures - Raise exceptions instead of returning False - Handle logout errors in CLI with non-zero exit - Prevent reauth hangs in non-interactive shells - Update tests to verify error propagation
a598de6 to
1823419
Compare
Implement logout to remove session files and add re-authentication capabilities through new CLI flags. This change enhances session management by allowing users to clear stored sessions and refresh credentials easily. Update documentation to reflect these new features and include tests to ensure functionality.