Skip to content

Conversation

@jr
Copy link
Collaborator

@jr jr commented Jul 1, 2025

We may need to eventually consider refreshing the token and extracting information from it, but for now I think this should be sufficient.


Important

Add static token authentication support and refactor authentication services for modularity and testing.

  • Authentication:
    • Add StaticTokenAuthService for static token authentication in StaticTokenAuthService.ts.
    • Modify CloudService to use StaticTokenAuthService if ROO_CODE_CLOUD_TOKEN is set, otherwise use WebAuthService.
    • Refactor AuthService into WebAuthService and StaticTokenAuthService.
  • Refactoring:
    • Move AuthService interface to AuthService.ts.
    • Rename AuthService.ts to WebAuthService.ts.
    • Update imports to use new paths in CloudService.ts, SettingsService.ts, ShareService.ts, and TelemetryClient.ts.
  • Testing:
    • Add tests for StaticTokenAuthService in StaticTokenAuthService.spec.ts.
    • Update tests for WebAuthService in WebAuthService.spec.ts.
    • Update mocks and tests in CloudService.test.ts and ShareService.test.ts to reflect new authentication structure.

This description was created by Ellipsis for 8f89b0f. You can customize this summary. It will automatically update as commits are pushed.

@jr jr requested review from cte and mrubens as code owners July 1, 2025 22:28
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jul 1, 2025
@delve-auditor
Copy link

delve-auditor bot commented Jul 1, 2025

No security or compliance issues detected. Reviewed everything up to 8f89b0f.

Security Overview
  • 🔎 Scanned files: 12 changed file(s)
Detected Code Changes
Change Type Relevant files
Enhancement ► CloudService.ts
    Add support for alternate auth token from environment
► auth/WebAuthService.ts
    Refactor existing auth service
► auth/StaticTokenAuthService.ts
    Implement static token auth service
► auth/AuthService.ts
    Define auth service interface
► auth/index.ts
    Export auth services and types
Refactor ► SettingsService.ts
    Update auth service imports
► ShareService.ts
    Update auth service imports
► TelemetryClient.ts
    Update auth service imports

Reply to this PR with @delve-auditor followed by a description of what change you want and we'll auto-submit a change to this PR to implement it.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 1, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Jul 2, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jul 2, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 2, 2025
@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Needs Review] in Roo Code Roadmap Jul 2, 2025
@mrubens mrubens merged commit 0504041 into main Jul 2, 2025
29 checks passed
@mrubens mrubens deleted the jr/alternate-token-auth branch July 2, 2025 02:23
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 2, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Jul 2, 2025
utarn pushed a commit to modelharbor/ModelHarbor-Agent that referenced this pull request Jul 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer PR - Needs Review size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants