Skip to content

update: authentication in a popup (Partial update) - #775

Open
tamalchowdhury wants to merge 1 commit into
mainfrom
tamal/update/popup-auth-update-partial
Open

update: authentication in a popup (Partial update)#775
tamalchowdhury wants to merge 1 commit into
mainfrom
tamal/update/popup-auth-update-partial

Conversation

@tamalchowdhury

@tamalchowdhury tamalchowdhury commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

This PR updates the documentation of auth in popup. It makes a partial update to 4 pages.

Summary by CodeRabbit

  • Documentation
    • Added guidance for authentication in popup windows when applications run inside iframes.
    • Documented popup configuration, same-origin redirect requirements, callback setup, and blocked-popup error handling for the React and JavaScript SDKs.
    • Clarified that hosted authentication pages cannot be embedded directly because of security protections.
    • Expanded security documentation covering clickjacking prevention and related authentication safeguards.
    • Refreshed page descriptions, keywords, summaries, and update metadata.

@tamalchowdhury
tamalchowdhury requested a review from a team as a code owner July 30, 2026 06:40
@github-actions github-actions Bot added the sdk label Jul 30, 2026
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The documentation updates add iframe popup authentication guidance for the JavaScript and React SDKs, expand redirect and popup configuration references, and clarify hosted authentication framing protections, FAQ behavior, and related security metadata.

Changes

Iframe popup authentication

Layer / File(s) Summary
JavaScript SDK popup flow
src/content/docs/developer-tools/sdks/frontend/javascript-sdk.mdx
Updates SDK metadata and documents popup authentication, callback handling, same-origin redirect_uri requirements, popup sizing, user-gesture requirements, and ERR_POPUP.
React SDK popup flow
src/content/docs/developer-tools/sdks/frontend/react-sdk.mdx
Updates SDK metadata and documents iframe popup authentication, KindeProvider, redirectUri, popupOptions, success/error callbacks, and local testing.
Security and FAQ guidance
src/content/docs/authenticate/about-auth/kinde-authentication-faq.mdx, src/content/docs/get-started/learn-about-kinde/kinde-product-security.mdx
Clarifies hosted authentication framing protections, iframe application popup behavior, custom authentication page guidance, and security metadata.

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

Sequence Diagram(s)

sequenceDiagram
  participant IframeApp
  participant SDK
  participant AuthPopup
  participant KindeAuth
  IframeApp->>SDK: Start authentication
  SDK->>AuthPopup: Open popup for iframe context
  AuthPopup->>KindeAuth: Load hosted authentication
  KindeAuth-->>AuthPopup: Redirect to same-origin callback
  AuthPopup-->>SDK: Return authentication result
  SDK-->>IframeApp: Invoke success or error callback
Loading

Suggested reviewers: onderay

Poem

A rabbit hops through docs so bright,
Popup windows guide the night.
CSP guards the hosted door,
SDKs bring the result ashore.
“Same-origin!” the bunnies say—
And authentication finds its way.

🚥 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 accurately reflects the docs update about popup-based authentication across the affected pages.
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/popup-auth-update-partial

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.

@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: 2

🤖 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/developer-tools/sdks/frontend/javascript-sdk.mdx`:
- Line 242: Update the popup user-gesture guidance in
src/content/docs/developer-tools/sdks/frontend/javascript-sdk.mdx lines 242-242
to include logout() alongside login() and register(). Apply the same guidance
update in src/content/docs/developer-tools/sdks/frontend/react-sdk.mdx lines
299-299, ensuring logout() is documented as being invoked directly from a user
gesture.

In `@src/content/docs/get-started/learn-about-kinde/kinde-product-security.mdx`:
- Line 62: Update the sentence near the authentication-page security statement
to limit Kinde’s responsibility to maintaining controls for its hosted
authentication pages, and explicitly retain customers’ responsibility for
securing their own application pages.
🪄 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 Plus

Run ID: 3c4c453d-de44-428e-bdf5-34a58c4f7fe0

📥 Commits

Reviewing files that changed from the base of the PR and between d075aff and eb40059.

📒 Files selected for processing (4)
  • src/content/docs/authenticate/about-auth/kinde-authentication-faq.mdx
  • src/content/docs/developer-tools/sdks/frontend/javascript-sdk.mdx
  • src/content/docs/developer-tools/sdks/frontend/react-sdk.mdx
  • src/content/docs/get-started/learn-about-kinde/kinde-product-security.mdx


The popup opens at 500 × 600 pixels, centred on the user's screen. This is not configurable in this SDK. If you need to control the popup dimensions, use the [React SDK](/developer-tools/sdks/frontend/react-sdk/#set-the-popup-size-and-position), which exposes a `popupOptions` option.

Browsers block popups that aren't opened in response to a user gesture, so call `login()` or `register()` directly from a click handler. When a popup can't be opened during sign-out, the SDK calls `on_error_callback` with the error `ERR_POPUP`.

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Include logout() wherever popup user-gesture guidance is given. Both SDK pages document popup-based iframe logout, so logout must also be invoked directly from a user gesture.

  • src/content/docs/developer-tools/sdks/frontend/javascript-sdk.mdx#L242-L242: Change the guidance to include logout().
  • src/content/docs/developer-tools/sdks/frontend/react-sdk.mdx#L299-L299: Change the guidance to include logout().
📍 Affects 2 files
  • src/content/docs/developer-tools/sdks/frontend/javascript-sdk.mdx#L242-L242 (this comment)
  • src/content/docs/developer-tools/sdks/frontend/react-sdk.mdx#L299-L299
🤖 Prompt for 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.

In `@src/content/docs/developer-tools/sdks/frontend/javascript-sdk.mdx` at line
242, Update the popup user-gesture guidance in
src/content/docs/developer-tools/sdks/frontend/javascript-sdk.mdx lines 242-242
to include logout() alongside login() and register(). Apply the same guidance
update in src/content/docs/developer-tools/sdks/frontend/react-sdk.mdx lines
299-299, ensuring logout() is documented as being invoked directly from a user
gesture.

To prevent [clickjacking](https://cheatsheetseries.owasp.org/cheatsheets/Clickjacking_Defense_Cheat_Sheet.html) attacks where a users personal information or credentials may be stolen by hidden iFrames, use Kindes hosted pages for authentication. Hosted pages have protections in place such as such as strict CSP and security headers to prevent itself from being embedded as an iFrame.
To prevent [clickjacking](https://cheatsheetseries.owasp.org/cheatsheets/Clickjacking_Defense_Cheat_Sheet.html) attacks, where a user's personal information or credentials may be stolen by hidden iFrames, use Kinde's hosted pages for authentication. Hosted pages have protections in place such as strict CSP and security headers to prevent them from being embedded as an iFrame.

Kinde controls and hosts the authentication pages, so the risk for protecting pages is assumed by Kinde rather than you.

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.

🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win

Clarify the shared security responsibility.

“Kinde rather than you” can imply that customers need not protect their own application pages. Limit this to Kinde maintaining controls for its hosted auth pages, while customers remain responsible for their application security.

🤖 Prompt for 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.

In `@src/content/docs/get-started/learn-about-kinde/kinde-product-security.mdx` at
line 62, Update the sentence near the authentication-page security statement to
limit Kinde’s responsibility to maintaining controls for its hosted
authentication pages, and explicitly retain customers’ responsibility for
securing their own application pages.

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.

1 participant