Skip to content

Conversation

@amrit110
Copy link
Member

@amrit110 amrit110 commented Nov 2, 2025

This pull request significantly refactors the onboarding process to improve reliability, user experience, and security. The most important changes are a switch from fetching tokens via Secret Manager to using a dedicated token service, enhanced checks for onboarding status, and improved handling of the .env file. The CLI now provides clearer feedback to users and supports a --force option for re-onboarding.

Authentication and Token Fetching:

  • Replaced the fetch_token_from_secret_manager method with fetch_token_from_service, which retrieves a fresh Firebase token from a Cloud Run token service using authenticated identity tokens, ensuring tokens are always up-to-date and reducing dependency on Secret Manager. [1] [2] [3]

Onboarding Status and User Experience:

  • Added check_onboarded_status utility and integrated it into the CLI to check Firestore for existing onboarding status, allowing the CLI to skip redundant onboarding steps unless --force is specified. [1] [2]
  • Introduced a --force flag to the CLI to allow users to re-onboard even if already marked as onboarded. [1] [2]

Environment File Handling:

  • Added validate_env_file utility and related CLI logic to check if the .env file is present and complete before proceeding, providing clear instructions to the user and avoiding unnecessary steps if the environment is already set up. [1] [2]

Testing Improvements:

  • Updated the integration test runner to use pytest via the Python module interface for improved test execution consistency.

Code Quality and Minor Fixes:

  • Cleaned up imports (removed unnecessary type ignore, reordered), and improved function signatures for clarity and maintainability. [1] [2] [3] [4] [5]

@amrit110 amrit110 self-assigned this Nov 2, 2025
@amrit110 amrit110 added the enhancement New feature or request label Nov 2, 2025
@amrit110 amrit110 merged commit b1b03b1 into main Nov 2, 2025
3 checks passed
@amrit110 amrit110 deleted the use_firestore_token branch November 2, 2025 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants