Skip to content

Add private key authentication method#103

Merged
freema merged 3 commits intomainfrom
claude/add-private-key-auth-011CUoNVq9JbEkjfATeaxTMN
Nov 4, 2025
Merged

Add private key authentication method#103
freema merged 3 commits intomainfrom
claude/add-private-key-auth-011CUoNVq9JbEkjfATeaxTMN

Conversation

@freema
Copy link
Copy Markdown
Owner

@freema freema commented Nov 4, 2025

This pull request introduces a new, simplified authentication method for Google service accounts using only the private key and client email, in addition to the existing file-based and JSON string methods. The documentation and environment configuration have been updated to reflect this new option, and validation logic has been enhanced to support and verify the new method.

Authentication method improvements:

  • Added support for authenticating with Google using just GOOGLE_PRIVATE_KEY and GOOGLE_CLIENT_EMAIL, making setup easier for users who don't want to manage full JSON files. (src/utils/google-auth.ts)
  • Updated authentication validation logic to check for the new private key + email method, including format checks for both fields and improved error messages. (src/utils/google-auth.ts) [1] [2]

Documentation and configuration updates:

  • Expanded the authentication section in README.md to describe all three supported methods, including detailed instructions and caveats for the new private key method. [1] [2]
  • Improved troubleshooting documentation to include common issues and checks for the private key + email authentication method. (README.md)
  • Added example environment variables for the new authentication method in .env.example. (.env.example)

Add support for direct private key + email authentication as a third, more user-friendly authentication method. Users can now authenticate using just GOOGLE_PRIVATE_KEY and GOOGLE_CLIENT_EMAIL environment variables instead of providing a full service account JSON file.

Changes:
- Add GOOGLE_PRIVATE_KEY + GOOGLE_CLIENT_EMAIL authentication option
- Update validation to support the new authentication method
- Add comprehensive validation for private key format and email
- Update README with detailed documentation for all three auth methods
- Update .env.example with the new authentication option
- Make GOOGLE_PROJECT_ID optional for private key auth

This provides users with three authentication options:
1. File path (GOOGLE_APPLICATION_CREDENTIALS)
2. Full JSON string (GOOGLE_SERVICE_ACCOUNT_KEY)
3. Private key + email (GOOGLE_PRIVATE_KEY + GOOGLE_CLIENT_EMAIL) - new
@freema freema merged commit 168fb0f into main Nov 4, 2025
4 checks passed
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.

2 participants