mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
## Problem Scoped OAuth Apps M1 adds two settings to OAuth apps: **Use the permissions of the person who connects** and **Ask for specific projects**. Together they let any organization member authorize an app with their own role, and let people limit an app to the projects they choose. The settings are in private beta. The current OAuth docs assume an Owner or Administrator authorizes an app for the whole organization, and they describe tokens as having full Management API access. App authors have no guidance on what changes when they turn on either setting. Organization admins have nothing on reviewing or revoking member grants. Linear: [[CTRL-2123]](https://linear.app/supabase/project/oauth-app-granular-permissions-scoped-oauth-apps-23de6daf1501) ## Solution Four new guides under `build-a-supabase-oauth-integration/`, plus edits that weave scoped access into the existing Build an Integration pages and the docs nav. | Page | Type | For | | --- | --- | --- | | Scoped access for OAuth apps | Explainer | App authors deciding whether to turn the settings on | | Update your app for scoped access | Guide | App authors changing their code, including which roles can authorize each scope | | Test scoped access on a staging app | Guide | App authors testing before production | | Manage OAuth app access | Guide | Organization admins and members reviewing and revoking grants | Edits to existing pages: - **Build a Supabase OAuth integration:** - The intro no longer says tokens have "full access", and points to scoped access. - The authorize parameters add `project_ref`. - The callback section covers a canceled authorization (`error=access_denied` and `state`) and explains `scope` and `project_refs`, including `project_refs` being `null` for an all-projects grant. - The refresh section notes that a member leaving ends their grant. - **OAuth scopes:** a new "Scopes and member roles" section links to the role table. - **Navigation:** the four pages are added to "Supabase OAuth Integration" after "OAuth scopes" as **Scoped access**, **Update your app**, **Test on staging** and **Manage app access**. The entries are added in both nav files: `features/IaNav/option1/integrations.ts` and `components/Navigation/NavigationMenu/NavigationMenu.constants.ts`. Key choices: - **Explainer separate from the guides.** The overview has no instructions, so authors can decide whether to turn the settings on before reading the code changes. - **Role table in the update guide.** It's derived from the scope and role mapping, and sits next to the advice it supports. The OAuth scopes page links to it rather than duplicating it. - **Partial grants are described as not available in the dashboard.** The pages point authors to the "Handle scopes missing from the grant" section instead of naming an API field. - **No rollout dates.** Dates belong in the changelog and partner emails, per `03-page-structure.md`. The pages state private beta status and the support-ticket route only for the initial TPP rollout. ## Still to be added - **No API reference.** `project_ref` and `project_refs` come from the Management API OpenAPI spec, so field-level detail is out of scope here. ## Preview links See PR preview Head to `docs/guides/integrations/build-a-supabase-oauth-integration` ### Self-review Reviewed with `review-the-docs` (local self-review) before opening. - **Passed:** voice, structure, frontmatter, internal links, anchors and nav. Code snippets run with stub values. - **Formatting:** Prettier check passes on all changed files. A follow-up commit fixed table alignment in three new guides. - **Edits to existing pages:** tested against the live text of both pages. - **Still to run:** `pnpm build:guides-markdown`, and the `WORD_LIST.md` two-pass check, including "re-authorize" and "turn on" vs "select". ## Checklist Check all before review: - [x] I have read [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) - [x] If I wrote a new docs topic or edited an existing topic, I used the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs [style guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide) --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com> Co-authored-by: Joshen Lim <joshenlimek@gmail.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Supabase Docs
This directory contains the Next.js app for supabase.com/docs.
Guides live in content/ as MDX. Reference pages are generated from the specs in spec/: OpenAPI, SDKSpec, ConfigSpec, and CLISpec. Some sections come from other repositories.
Where to go
- To write a page, follow the style guide.
- To find where a page lives, add one, or update generated reference docs, use the contributing guide. Library maintainers start at Reference structure.
- To use an agent, use the AI agent skills for docs authoring. Those skills include framing a page and placing it in the information architecture.
- To run the site locally, use the developers' guide.
- To add or change a redirect, read
lib/redirects/README.mdfirst.