Commit Graph
1 Commits
Author SHA1 Message Date
Charis 57a5087579 feat(studio): gate integrations landing api-keys query on grants (#52963)
Part 3 of 6 in a stack for
[FE-4731](https://linear.app/supabase/issue/FE-4731/grants-rollout-api-keys-consumers-that-only-need-publishable-keys)..

## Stack
1. #52961 Docs and project API docs consumers
2. #52962 Edge functions and vector bucket examples
3. 👉 #52963 Integrations landing data
4. #52964 Connect sheet and project connection popover; remove the
transitional api-keys hooks
5. #52965 `reveal` refinement for single api-key reads; API key pill
6. #52966 API key create and delete

## Changes
`useProjectOAuthIntegrationData`
(`Integrations/Landing/Landing.utils.ts`) read api-keys through the
transitional hook with no guard. It now takes a plain `GET
/v1/projects/{ref}/api-keys` grant.

A query skipped by `skipToken` stays pending forever, so a small helper
folds the grant into the api-keys query state:
- loading grant: pending
- denied: settles with no keys and no error, matching how a 403 was
treated before (no request is sent)
- permission-check error: surfaced as the hook's error

## Testing
- `Landing.utils.platform.test.tsx`: granted, denied (settles, no
request, no error), and permission-check error.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-11-05 06:48:49 -05:00