Skip to content

Add a token metadata endpoint#1966

Open
djeebus wants to merge 19 commits intomainfrom
add-token-metadata-endpoint
Open

Add a token metadata endpoint#1966
djeebus wants to merge 19 commits intomainfrom
add-token-metadata-endpoint

Conversation

@djeebus
Copy link
Contributor

@djeebus djeebus commented Feb 23, 2026

Note

Medium Risk
Touches authentication-adjacent routing and exposes identity metadata; risk is mainly incorrect security config or unintended information disclosure if auth middleware/scopes are misapplied.

Overview
Adds a new authenticated GET /me endpoint that returns basic token/team metadata (teamID, teamName) for the caller, including OpenAPI schema/route wiring and regenerated clients/server stubs, plus an integration test covering authorized and unauthorized access.

Written by Cursor Bugbot for commit 5c099e3. This will update automatically on new commits. Configure here.

Copy link

@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: 1e717f177f

ℹ️ 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".

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

spec/openapi.yml Outdated
- ApiKeyAuth: []
- Supabase1TokenAuth: []
Supabase2TeamAuth: []
- {} # support anonymous or failed auth tokens
Copy link
Contributor Author

Choose a reason for hiding this comment

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

No need for this, the API's auth middleware will return 403 without work

Comment on lines 12 to 17
teamInfo, ok := a.safeGetTeamInfo(c)
if !ok {
a.sendAPIStoreError(c, http.StatusUnauthorized, "no credentials found")

return
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can panic on non-nil team info, the auth middleware should take care of this already.

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