This commit introduces a global option to the GarminSync CLI, providing verbose logging and diagnostic information for troubleshooting.
Key changes include:
- Implemented a to manage and propagate the debug flag across CLI commands.
- Refactored in to accept and utilize the debug flag, enabling detailed logging of HTTP requests and responses.
- Updated CLI commands (, ) to access the from the .
- Resolved circular import by extracting into a dedicated module.
- Configured for Poetry-based dependency management.
- Addressed various type hinting issues and linting warnings across the CLI codebase to maintain code quality.
This commit resolves the persistent `garminconnect` login failure caused by
changes in Garmin's SSO process. The authentication mechanism has been
refactored to primarily use the `garth` library for initial login and
Multi-Factor Authentication (MFA) handling, enhancing robustness and
adhering to the feature plan.
Key changes include:
- Refactored `_perform_login` in `backend/src/services/garmin_auth_service.py`
to directly utilize `garth.Client().login()`, replacing the problematic
`garminconnect.login()`.
- Updated `initial_login` to gracefully handle `garth`'s MFA exceptions,
returning appropriate responses to guide the authentication flow.
- Added a new `complete_mfa_login` method to `backend/src/services/garmin_auth_service.py`
for submitting MFA codes and finalizing the login process.
- Ensured `garminconnect` implicitly leverages the established `garth` session,
eliminating redundant login attempts.
- Addressed static analysis issues by updating `typing` imports and
suppressing `mypy` errors for `garth.Client` attributes where appropriate.
This commit implements the multi-factor authentication (MFA) flow for the CLI
using the garth library, as specified in task 007.
Changes include:
- Created to handle API communication with robust error handling.
- Refactored to correctly implement the logout logic
and ensure proper handling of API client headers.
- Updated with Black, Flake8, Mypy, and Isort configurations.
- Implemented and refined integration tests for authentication, sync operations,
and sync status checking, including mocking for the API client.
- Renamed integration test files for clarity and consistency.
- Updated to reflect task completion.
- Created detailed implementation plan with technical context
- Developed data models for GarthToken, MFAChallenge, and UserSession entities
- Defined API contracts for MFA authentication flow
- Created quickstart guide for implementation
- Updated agent context with new technology stack
- Verified constitution compliance for all design decisions
- Define user stories for MFA authentication support
- Specify requirements for garth token management
- Define success criteria for MFA implementation
- Create quality checklist for specification validation
- Create full CLI application with authentication, sync triggering, and status checking
- Implement MFA support for secure authentication
- Add token management with secure local storage
- Create API client for backend communication
- Implement data models for User Session, Sync Job, and Authentication Token
- Add command-line interface with auth and sync commands
- Include unit and integration tests
- Follow project constitution standards for Python 3.13, type hints, and code quality
- Support multiple output formats (table, JSON, CSV)
- Created actionable task breakdown organized by user story
- Included setup, foundational, and implementation tasks
- Added test tasks for each user story
- Organized tasks with proper dependencies and parallelization markers
- Aligned with design artifacts and functional requirements
- Created implementation plan with technical context
- Developed data models for User Session, Sync Job, and Authentication Token
- Defined API contracts for authentication, sync triggering, and status checking
- Created quickstart guide for CLI usage
- Updated agent context with new technology stack
- Verified constitution compliance for all design decisions
- Define user stories for authentication, sync triggering, and status checking
- Specify functional requirements for text-based API interactions
- Define success criteria for authentication and sync operations
- Create quality checklist for specification validation