Skip to content

update: Supabase new OIDC integration - #764

Open
tamalchowdhury wants to merge 4 commits into
mainfrom
tamal/update/supabase-new-oidc-integration
Open

update: Supabase new OIDC integration#764
tamalchowdhury wants to merge 4 commits into
mainfrom
tamal/update/supabase-new-oidc-integration

Conversation

@tamalchowdhury

@tamalchowdhury tamalchowdhury commented Jul 13, 2026

Copy link
Copy Markdown
Collaborator

This PR replaces the old minted JWT authentication to Supabase native OIDC integration. Now Kinde works as an IdP for Supabase; SB handles the session, and users are stored in the database.

Summary by CodeRabbit

  • Documentation
    • Replaced the Kinde–Supabase integration guide with a streamlined Quickstart for Next.js.
    • Added setup instructions for Kinde as a custom OAuth provider, including scopes, callback URLs, and auto-discovery.
    • Added examples for login, registration, logout, OAuth callbacks, session handling, and protected-route redirects.
    • Included a verification checklist for confirming authentication in both dashboards.

@tamalchowdhury
tamalchowdhury requested a review from a team as a code owner July 13, 2026 10:14
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@tamalchowdhury, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 16 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 6bb88794-2e8b-4607-b782-bd58720e0d5a

📥 Commits

Reviewing files that changed from the base of the PR and between da57d6b and 317b1db.

📒 Files selected for processing (1)
  • src/content/docs/integrate/third-party-tools/kinde-supabase.mdx

Walkthrough

The Kinde–Supabase integration guide was rewritten as a Quickstart covering custom OAuth configuration, Next.js authentication flows, logout handling, redirects, and verification steps.

Changes

Kinde–Supabase OAuth Quickstart

Layer / File(s) Summary
Provider setup and guide metadata
src/content/docs/integrate/third-party-tools/kinde-supabase.mdx
Updates document metadata and explains Kinde application creation, Supabase custom provider configuration, scopes, and callback URLs.
Next.js OAuth flow and validation
src/content/docs/integrate/third-party-tools/kinde-supabase.mdx
Documents login and registration buttons, callback session exchange, logout redirection, protected-route redirects, and checks for users in Kinde and Supabase.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: onderay

Poem

I’m a bunny hopping through OAuth bright,
Kinde sends the user into Supabase light.
Next.js catches the code with care,
Sessions and redirects bloom in the air.
Login, logout—everything’s neat,
Two dashboards make the trail complete!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: documenting Supabase's new OIDC integration with Kinde.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch tamal/update/supabase-new-oidc-integration

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.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 13, 2026

Copy link
Copy Markdown

Deploying kinde-docs-preview with  Cloudflare Pages  Cloudflare Pages

Latest commit: 317b1db
Status: ✅  Deploy successful!
Preview URL: https://e6ba8e15.kinde-docs-preview.pages.dev
Branch Preview URL: https://tamal-update-supabase-new-oi.kinde-docs-preview.pages.dev

View logs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/content/docs/integrate/third-party-tools/kinde-supabase.mdx`:
- Around line 100-114: Update the Kinde-Supabase integration guide’s setup steps
to instruct users to add /auth/callback to Supabase Authentication > URL
Configuration, including http://localhost:3000/auth/callback and the
corresponding production URL.
- Around line 188-198: Validate the next parameter in the GET callback before
using it in NextResponse.redirect, allowing only same-origin relative paths and
rejecting values such as `@attacker.example` or absolute URLs. Preserve the
existing /protected fallback and redirect valid paths using the existing origin.
- Around line 82-84: Update the Kinde setup instructions around the application
Details page to also add the local and production app origins to the Allowed
logout redirect URLs field, alongside the existing callback URL configuration,
so logout returns correctly to the app.
- Around line 77-79: Update the Aside in the Kinde/Supabase integration
documentation to instruct users to request the Kinde provider refresh token with
the `offline` scope instead of `offline_access`, and explicitly distinguish it
from Supabase’s session refresh token.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 046e3f06-c067-461d-88a2-575eb3017265

📥 Commits

Reviewing files that changed from the base of the PR and between 886d14b and da57d6b.

📒 Files selected for processing (1)
  • src/content/docs/integrate/third-party-tools/kinde-supabase.mdx

Comment thread src/content/docs/integrate/third-party-tools/kinde-supabase.mdx
Comment thread src/content/docs/integrate/third-party-tools/kinde-supabase.mdx Outdated
Comment thread src/content/docs/integrate/third-party-tools/kinde-supabase.mdx Outdated
Comment thread src/content/docs/integrate/third-party-tools/kinde-supabase.mdx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants