Skip to content

Add OAuth/OIDC discovery metadata for agents#41

Draft
baanish wants to merge 1 commit intomainfrom
cursor/oauth-discovery-metadata-9da7
Draft

Add OAuth/OIDC discovery metadata for agents#41
baanish wants to merge 1 commit intomainfrom
cursor/oauth-discovery-metadata-9da7

Conversation

@baanish
Copy link
Copy Markdown
Owner

@baanish baanish commented Apr 18, 2026

Summary

  • After next build, scripts/patch-oauth-discovery.mjs writes RFC 8414 and OpenID Connect discovery JSON under out/.well-known/ with the correct extensionless paths. Issuer defaults to https://agent-render.com; override with SITE_ORIGIN or PUBLIC_ORIGIN at build time. Subpath builds (NEXT_PUBLIC_BASE_PATH) use RFC 8414’s path insertion layout and place jwks.json under the base path only (not at the host root).
  • The optional self-hosted server serves GET /.well-known/oauth-authorization-server, GET /.well-known/openid-configuration, and GET /.well-known/jwks.json with issuer resolved from PUBLIC_ORIGIN or proxy headers.

Notes

Documents list conventional OAuth endpoints; the static viewer and current UUID artifact API are not gated by interactive OAuth—metadata is for programmatic discovery and honest disclosure.

Verification

  • npm run check
  • npm run selfhosted:build
Open in Web Open in Cursor 

…erver

Publish RFC 8414 and OpenID Connect discovery JSON after `next build`, with
issuer wiring via SITE_ORIGIN/PUBLIC_ORIGIN and correct path layout for
subpath deployments. The self-hosted server serves the same metadata
dynamically plus jwks_uri. Documents intentional placeholder endpoints since
the viewer UUID API is not secured by OAuth today.

Co-authored-by: Aanish Bhirud <baanish@users.noreply.github.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 18, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7785740a-5ffd-4860-a8e2-235195680b32

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/oauth-discovery-metadata-9da7

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 and usage tips.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying agent-render with  Cloudflare Pages  Cloudflare Pages

Latest commit: 578bd28
Status: ✅  Deploy successful!
Preview URL: https://16b40aee.agent-render.pages.dev
Branch Preview URL: https://cursor-oauth-discovery-metad.agent-render.pages.dev

View logs

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.

2 participants