Skip to content

Add user details in auth status#65

Open
ramilamparo wants to merge 1 commit intodev/ram/interactive-loginfrom
dev/ram/auth-me
Open

Add user details in auth status#65
ramilamparo wants to merge 1 commit intodev/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
try {
const api = createApi(tenantUrl, token, result.authType)
await api.projects.list()
const me = await api.users.me()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Avoid admin-only user endpoint for auth validation

auth status now validates credentials via api.users.me(), but QA Sphere’s Users API is admin-restricted in the public docs; in environments where /users routes enforce that policy, valid non-admin credentials will be reported as invalid or expired. This is a regression from the previous projects.list() check, which worked for regular project roles, so the status command can now fail for legitimate users.

Useful? React with 👍 / 👎.

@ramilamparo ramilamparo requested a review from a team April 27, 2026 14:26
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.

1 participant