Add user details in auth status#65
Add user details in auth status#65ramilamparo wants to merge 1 commit intodev/ram/interactive-loginfrom
auth status#65Conversation
|
Claude finished @ramilamparo's task in 2m 52s —— View job Review Summary
Result: Approved with one minor DRY suggestion on the The change is clean — switching from |
| export interface MeUser { | ||
| id: number | ||
| email: string | ||
| name: string | ||
| avatar: string | null | ||
| role: string | ||
| } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
💡 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".
| try { | ||
| const api = createApi(tenantUrl, token, result.authType) | ||
| await api.projects.list() | ||
| const me = await api.users.me() |
There was a problem hiding this comment.
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 👍 / 👎.
Sample output: