Skip to content

[codex] clarify frontend PKCE with server-side token exchange#92

Merged
basit3407 merged 7 commits intomainfrom
docs/clarify-oauth-client-auth-modes
Mar 31, 2026
Merged

[codex] clarify frontend PKCE with server-side token exchange#92
basit3407 merged 7 commits intomainfrom
docs/clarify-oauth-client-auth-modes

Conversation

@basit3407
Copy link
Copy Markdown
Collaborator

@basit3407 basit3407 commented Mar 31, 2026

Summary

  • clarify the recommended OAuth integration shape for current Request Access clients
  • keep frontend and mobile login + PKCE examples in the docs
  • recommend server-side authorization-code exchange and refresh for currently issued clients
  • keep direct in-app token exchange documented only for clients explicitly registered with token_endpoint_auth_method=none

Why

The docs could be read as if direct in-app token exchange was the default path for every client. In practice, the current Request Access flow provisions confidential clients, so the recommended integration shape is: app handles login + PKCE, backend handles code exchange and refresh.

Validation

  • git diff --check
  • Did not rerun yarn build or yarn typecheck; earlier yarn typecheck failure in src/theme/ApiDemoPanel/Curl/index.tsx is still unrelated to these docs changes
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Mar 31, 2026

Deploying qf-api-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: f156632
Status: ✅  Deploy successful!
Preview URL: https://e5f0cabb.qf-api-docs.pages.dev
Branch Preview URL: https://docs-clarify-oauth-client-au.qf-api-docs.pages.dev

View logs

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the OIDC/OAuth2 tutorial docs to clearly distinguish public vs confidential OAuth clients based on Hydra client registration, preventing integrations from incorrectly omitting client_secret and hitting invalid_client at the token endpoint.

Changes:

  • Clarifies that client type is determined at registration time via token_endpoint_auth_method (not at implementation time).
  • Updates quickstart guidance and examples to explicitly scope mobile/native flows to public clients (token_endpoint_auth_method=none) and server flows to confidential clients (default client_secret_basic).
  • Adds clearer troubleshooting/expectations around invalid_client when confidential client authentication is omitted.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
docs/tutorials/oidc/user-apis-quickstart.mdx Tightens platform guidance so public/mobile examples only apply to token_endpoint_auth_method=none; reinforces server-side token exchange/refresh for confidential clients.
docs/tutorials/oidc/getting-started-with-oauth2.mdx Adds an explicit registration-based client-type explanation, and annotates token/refresh exchange examples to match Hydra auth modes and avoid invalid_client.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/tutorials/oidc/user-apis-quickstart.mdx Outdated
@basit3407 basit3407 changed the title [codex] clarify oauth client auth modes in docs Mar 31, 2026
@basit3407 basit3407 changed the title [codex] align oauth docs with current request access flow Mar 31, 2026
@basit3407 basit3407 changed the title [codex] keep frontend oauth examples with backend exchange Mar 31, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/tutorials/oidc/mobile-apps/react-native.mdx Outdated
Comment thread docs/tutorials/oidc/mobile-apps/react-native.mdx
Comment thread docs/tutorials/oidc/user-apis-quickstart.mdx Outdated
Comment thread docs/tutorials/oidc/user-apis-quickstart.mdx
Comment thread docs/tutorials/oidc/user-apis-quickstart.mdx
Comment thread docs/tutorials/oidc/user-apis-quickstart.mdx Outdated
Comment thread docs/tutorials/oidc/mobile-apps/_obtain_client_credentials.mdx Outdated
Comment thread docs/tutorials/oidc/getting-started-with-oauth2.mdx
@basit3407 basit3407 marked this pull request as ready for review March 31, 2026 16:51
@basit3407 basit3407 merged commit 89fc2e2 into main Mar 31, 2026
1 check passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f156632795

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/tutorials/oidc/user-apis-quickstart.mdx
Comment thread docs/tutorials/oidc/user-apis-quickstart.mdx
@basit3407
Copy link
Copy Markdown
Collaborator Author

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 89fc2e2124

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/tutorials/oidc/user-apis-quickstart.mdx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants