Skip to content

fix: login command API key validation#75

Open
jayanratna wants to merge 3 commits intoresend:mainfrom
jayanratna:fix-login-api-validation
Open

fix: login command API key validation#75
jayanratna wants to merge 3 commits intoresend:mainfrom
jayanratna:fix-login-api-validation

Conversation

@jayanratna
Copy link

This PR fixes an issue in the login command where the API validation did not return an error when something goes wrong.

Fixes #70

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/commands/auth/login.ts">

<violation number="1" location="src/commands/auth/login.ts:140">
P1: The validation logic treats any error from `resend.domains.list()` as an invalid API key, which produces false negatives. Valid API keys will be rejected for rate limits (429), server errors (5xx), or permission issues (keys without full_access scope cannot call domains.list()).</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

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.

Resend login saves API keys without validating against the API

2 participants