Skip to content

docs(auth): correct OAuth grant methods and response shape - #48923

Open
lazerg wants to merge 1 commit into
supabase:masterfrom
lazerg:fix/issue-48918-oauth-grants-docs
Open

docs(auth): correct OAuth grant methods and response shape#48923
lazerg wants to merge 1 commit into
supabase:masterfrom
lazerg:fix/issue-48918-oauth-grants-docs

Conversation

@lazerg

@lazerg lazerg commented Aug 11, 2026

Copy link
Copy Markdown

I have read the CONTRIBUTING.md file.

YES

What kind of change does this PR introduce?

Docs update.

What is the current behavior?

The OAuth flows guide calls supabase.auth.oauth.getUserGrants(), which doesn't exist on the client, passes a positional client ID to revokeGrant(), and shows a flat grant object with client_name and created_at.

Fixes #48918

What is the new behavior?

The samples use listGrants() and revokeGrant({ clientId }), and the response block matches the OAuthGrant type in @supabase/auth-js: a nested client object plus scopes and granted_at.

Summary by CodeRabbit

  • Documentation
    • Updated OAuth grant-management examples to use listGrants() for retrieving grants.
    • Updated grant response examples to include nested client details and the granted_at timestamp.
    • Updated grant revocation examples to pass the client ID using { clientId }.
    • Replaced references to the deprecated getUserGrants() method.

@lazerg
lazerg requested a review from a team as a code owner August 11, 2026 06:26
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for contributing to Supabase! ❤️ Our team will review your PR.

A few tips for a smoother review process:

  • If you have a local version of the repo, run pnpm run format to make sure formatting checks pass.
  • Once we've reviewed your PR, please don't trivially merge master (don't click Update branch if there are no merge conflicts to be fixed). This invalidates any pre-merge checks we've run.

@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

@lazerg is attempting to deploy a commit to the Supabase Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Aug 11, 2026
@vercel

vercel Bot commented Aug 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
design-system Ready Ready Preview Aug 11, 2026 6:27am

Request Review

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 656ab168-639c-43fa-85f8-f93d46509be5

📥 Commits

Reviewing files that changed from the base of the PR and between b648db2 and fccbf6f.

📒 Files selected for processing (1)
  • apps/docs/content/guides/auth/oauth-server/oauth-flows.mdx

📝 Walkthrough

Walkthrough

The OAuth server guide updates grant-listing and revocation method calls. It also updates the documented grant response to use nested client details and the granted_at timestamp.

Changes

OAuth grant documentation

Layer / File(s) Summary
Align OAuth grant examples with the SDK
apps/docs/content/guides/auth/oauth-server/oauth-flows.mdx
The guide uses listGrants(), documents the nested client response shape with granted_at, and passes clientId to revokeGrant through an options object.

Estimated code review effort: 2 (Simple) | ~5 minutes

Possibly related PRs

Suggested reviewers: czenko

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the OAuth documentation corrections, including grant methods and response shape.
Description check ✅ Passed The description explains the change, current and new behavior, contribution check, and linked issue; only optional additional context is omitted.
Linked Issues check ✅ Passed The PR addresses all three requirements in issue #48918: method names, revoke options, and the OAuthGrant response shape.
Out of Scope Changes check ✅ Passed The changes are limited to the OAuth flows documentation and directly support the requirements in issue #48918.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update OAuth docs page

1 participant