Skip to content

Add user details in auth status#65

Merged
satvik007 merged 1 commit into
dev/ram/interactive-loginfrom
dev/ram/auth-me
May 12, 2026
Merged

Add user details in auth status#65
satvik007 merged 1 commit into
dev/ram/interactive-loginfrom
dev/ram/auth-me

Conversation

@ramilamparo
Copy link
Copy Markdown
Collaborator

@ramilamparo ramilamparo commented Apr 27, 2026

Sample output:

  Credentials connected via https://acme.eu1.qasphere.com
    Source: credentials.json
    Status: valid
    User: Test User <tester@example.com> (admin)
    Re-authentication required: in 89 days (resets on each use)

@claude
Copy link
Copy Markdown

claude Bot commented Apr 27, 2026

Claude finished @ramilamparo's task in 2m 52s —— View job


Review Summary

  • Gather PR context and diff
  • Launch specialized review subagents
  • Aggregate findings and post review
  • Clean up outdated bot comments

Result: Approved with one minor DRY suggestion on the MeUser interface.

The change is clean — switching from projects.list() to /users/me for credential validation is a better semantic fit and lighter on the API. Tests are thoroughly updated. No security or performance concerns.

Copy link
Copy Markdown

@claude claude Bot left a comment

Choose a reason for hiding this comment

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

Clean change — using /users/me instead of projects.list() is both a better semantic fit for credential validation and lighter on the API. Tests are well-updated to match. One minor DRY suggestion on the interface definition.

Comment thread src/api/users.ts
Comment on lines +10 to +16
export interface MeUser {
id: number
email: string
name: string
avatar: string | null
role: string
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit: MeUser duplicates all of User's fields, with avatar being the only addition. Consider extending instead:

export interface MeUser extends User {
	avatar: string | null
}

This avoids the maintenance burden of keeping both interfaces in sync if shared fields change.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a5814a3d1a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/commands/auth.ts
@ramilamparo ramilamparo requested a review from a team April 27, 2026 14:26
@satvik007 satvik007 merged commit 557ec01 into dev/ram/interactive-login May 12, 2026
8 checks passed
@satvik007 satvik007 deleted the dev/ram/auth-me branch May 12, 2026 18:44
satvik007 pushed a commit that referenced this pull request May 12, 2026
* Add interactive login

* Address PR comments

* Rename fields

* Fix mocks

* Address feedbacks

* Few improvements

* Clean up a bit

* Import type

* Refactor code to use standard oauth implementation.

* Check suspended flag

* Fix race condition in mocked imports

* Update agent skill

* Update table of contents

* Fix issues

* Fixes

* Tweaks

* Improve command description

* Add refresh token expiration

* Nits

* Address PR review feedback

- Restrict openBrowser URL scheme to http/https, surface execFile stderr
- Restore withDevAuth middleware in createApi
- Include client_id on refresh (RFC 6749 §6) and validate OAuth responses with Zod
- Distinguish OAuth protocol vs transport errors so transient failures preserve credentials
- Warn when stale-credential clear fails
- Strip trailing slash on tenantUrl in apikey resolvers
- Narrow credential source into ApiKeyCredentialSource | OAuthCredentialSource
- Warn on partial QAS_TOKEN/QAS_URL config per source
- Drop redundant pre-exit SIGINT removeListener calls
- Reword --run-url host mismatch error to show both hosts
- Cover OAuth bearer upload path and host-mismatch case in tests

* Address second-pass review

- Validate verification_uri / verification_uri_complete as URLs
- Extract credentialsFromTokenResponse to deduplicate token-to-credentials mapping
- Disable withHttpRetry on pollDeviceToken so the polling loop owns retry timing; treat 429/502/503 as transient and keep polling, honoring Retry-After
- Share parseRetryAfterMs and DEFAULT_HTTP_RETRY_OPTIONS between withHttpRetry and the poll path

* Add user details in `auth status` (#65)
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.

3 participants