Skip to content

Conversation

@brettchaldecott
Copy link

@brettchaldecott brettchaldecott commented Oct 22, 2025

Description (required)

  • Fixed appsettings.json structure to match starter kit configuration
  • Updated M2M token retrieval to use ClientCredentialsFlow correctly
  • Corrected Management API usage to use proper Configuration class
  • Removed fictional APIs and replaced with actual SDK methods
  • Updated ASP.NET Core integration to match real implementation
  • All examples now use actual SDK classes and methods from starter kit

Related issues & labels (optional)

  • Closes #
  • Suggested label:

Summary by CodeRabbit

  • Documentation
    • Complete .NET SDK guide expanded into a full walkthrough covering authentication flows (PKCE and client-credentials), token/session management, and Management API usage
    • Added table of contents, expanded keywords, and direct links to SDK/starter kit resources
    • Added environment-variable and appsettings.json examples plus programmatic client setup guidance
    • Enhanced ASP.NET Core integration guidance, HTTPS/dev setup, optional registration prompts, and reorganized org/permission workflows with updated examples

- Fixed appsettings.json structure to match starter kit configuration
- Updated M2M token retrieval to use ClientCredentialsFlow correctly
- Corrected Management API usage to use proper Configuration class
- Removed fictional APIs and replaced with actual SDK methods
- Updated ASP.NET Core integration to match real implementation
- All examples now use actual SDK classes and methods from starter kit
@github-actions github-actions bot added the sdk label Oct 22, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 22, 2025

Warning

Rate limit exceeded

@brettchaldecott has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 16 minutes and 38 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between ae7ae51 and b21cc53.

📒 Files selected for processing (1)
  • src/content/docs/developer-tools/sdks/backend/dotnet-sdk.mdx (2 hunks)

Walkthrough

Updated a single documentation page into a comprehensive .NET SDK guide for .NET 6.0+, adding PKCE and client-credentials flows, Management API integration, environment/appsettings and programmatic configuration, expanded API examples, and ASP.NET Core integration guidance.

Changes

Cohort / File(s) Summary
Documentation Rewrite
src/content/docs/developer-tools/sdks/backend/dotnet-sdk.mdx
Replaced the existing guide with a complete .NET SDK reference: added tableOfContents (maxHeadingLevel: 3), expanded keywords, new intro and GitHub links, updated NuGet/PackageReference and .csproj guidance, added appsettings.json and programmatic KindeClientBuilder configuration, detailed PKCE and client-credentials flows (authorization URL, redirect handling, token exchange), session management examples, Management API examples (orgs, permissions, claims, flags), ASP.NET Core/OpenID Connect integration notes, and numerous updated code samples throughout.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant App as Client App
  participant SDK as .NET SDK
  participant Auth as Authorization Server
  participant API as Management API

  rect rgba(220,235,255,0.6)
    Note over App,Auth: Interactive PKCE flow (user-facing)
    App->>SDK: Start PKCE auth (generate code_verifier/challenge)
    SDK->>Auth: Redirect to /authorize (code_challenge)
    Auth-->>App: Redirect with authorization code
    App->>SDK: Exchange code + verifier for tokens
    SDK->>Auth: /token request (code + verifier)
    Auth-->>SDK: Access token + ID token
  end

  rect rgba(235,245,220,0.6)
    Note over App,API: Server-to-server client credentials
    App->>SDK: Request client_credentials token
    SDK->>Auth: /token request (client_credentials)
    Auth-->>SDK: Access token
    SDK->>API: Call Management API with token
    API-->>SDK: Return resources (orgs, permissions, etc.)
  end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰
I hopped through docs, rearranged the light,
Added routes for tokens, PKCE in sight,
Configs snug in json and env,
Servers hum, permissions blend,
A rabbit grins — the guide feels right.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "Update .NET SDK documentation to match actual implementation" directly aligns with the changeset's primary objective. The raw summary shows the documentation was comprehensively updated with actual SDK classes, methods, and configuration patterns from the starter kit, while the PR objectives explicitly state that fictional APIs were removed and replaced with real implementations. The title is specific and clearly indicates the nature of the change—correcting documentation to align with the working implementation—which is concise, descriptive, and would help teammates quickly understand the purpose of these changes when scanning history.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

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
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

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

773-776: Fix consecutive sentences with identical opening words.

Three successive sentences begin with "This method," which affects readability. Consider rewording to vary sentence structure.

Apply this diff to improve clarity:

-#### `GetStringFlag`

-This method returns a string value.

+#### `GetStringFlag`

+Returns a string value from the flag.

828-830: Simplify verbose phrase.

"In order to" is unnecessarily wordy. The phrase can be shortened for conciseness.

Apply this diff:

-In order to use this SDK include the following package reference in your `.csproj` file:
+To use this SDK, include the following package reference in your `.csproj` file:

1031-1033: Apply proper hyphenation to compound adjective.

"Test sign up" should be hyphenated when used as a modifier before a noun.

Apply this diff:

-### Test sign up

-Register your first user by signing up yourself. You'll see your newly registered user on the **Users** page in Kinde.
+### Test sign-up

+Register your first user by signing up yourself. You'll see your newly registered user on the **Users** page in Kinde.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b0be9e5 and 4c17afe.

📒 Files selected for processing (1)
  • src/content/docs/developer-tools/sdks/backend/dotnet-sdk.mdx (2 hunks)
🧰 Additional context used
🪛 LanguageTool
src/content/docs/developer-tools/sdks/backend/dotnet-sdk.mdx

[style] ~775-~775: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...flag_name"); #### `GetStringFlag` This method returns a string value. csha...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~829-~829: Consider a more concise word here.
Context: ...ct dependencies #### PackageReference In order to use this SDK include following package ...

(IN_ORDER_TO_PREMIUM)


[grammar] ~1031-~1031: Use a hyphen to join words.
Context: ...nsApi(configuration); ``` ### Test sign up Register your first user by signing ...

(QB_NEW_EN_HYPHEN)

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

191-196: Verify environment variable name consistency.

Line 193 uses KINDE_SCOPES (plural), but all other environment variables in the documentation follow singular naming patterns (KINDE_CLIENT_ID, KINDE_CLIENT_SECRET). Clarify whether this should be KINDE_SCOPE (singular) or if KINDE_SCOPES is the correct environment variable name in the actual SDK.

… section

- Change section heading from 'GetFlags' to 'GetFlag' to match actual method name
- Update description to correctly state method returns FeatureFlag object
- Ensures consistency between heading, description, and code example
Copy link
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 (4)
src/content/docs/developer-tools/sdks/backend/dotnet-sdk.mdx (4)

728-748: Clarify flag retrieval mechanism in documentation.

Line 729 states "Once you have referenced the access token, the GetFlag method can be called," but the code example (lines 745–747) calls GetFlag on the kindeClient instance, not on a token object. Revise the explanation to match the actual usage pattern.

Apply this diff to clarify the method call:

-The flags can be retrieved from the token. Once you have referenced the access token, the `GetFlag` method can be called. This method returns a `FeatureFlag` object
+Flags can be retrieved using the `GetFlag` method on the `KindeClient` instance. This method returns a `FeatureFlag` object.

829-830: Simplify wordy phrasing.

Line 830 uses "In order to use" which is more verbose than necessary. Use "To use" instead for conciseness.

Apply this diff:

-In order to use this SDK include following package reference in your `.csproj` file.
+To use this SDK, include the following package reference in your `.csproj` file.

(Also note: "include following" should be "include the following" for grammatical correctness.)


1031-1031: Use hyphenated form for compound modifier.

Line 1031 reads "Test sign up" but should be hyphenated as "Test sign-up" when used as a section heading or noun phrase.

Apply this diff:

-### Test sign up
+### Test sign-up

752-752: Reduce repetitive sentence starters.

Lines 752, 776, and 800 each begin sentences with "This method returns," creating stylistic repetition. Consider varying the phrasing for readability.

Example revision for lines 752, 776, and 800:

 #### `GetBooleanFlag`
-This method returns a boolean value of the internal flag value.
+Returns a boolean value of the internal flag value.

 #### `GetStringFlag`
-This method returns a string value.
+Returns a string value.

 #### `GetIntegerFlag`
-The method returns the value for the key in type integer.
+Returns the value for the key in type integer.

Also applies to: 776-776, 800-800

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4c17afe and 44cbec2.

📒 Files selected for processing (1)
  • src/content/docs/developer-tools/sdks/backend/dotnet-sdk.mdx (2 hunks)
🧰 Additional context used
🪛 LanguageTool
src/content/docs/developer-tools/sdks/backend/dotnet-sdk.mdx

[style] ~775-~775: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...flag_name"); #### `GetStringFlag` This method returns a string value. csha...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~829-~829: Consider a more concise word here.
Context: ...ct dependencies #### PackageReference In order to use this SDK include following package ...

(IN_ORDER_TO_PREMIUM)


[grammar] ~1031-~1031: Use a hyphen to join words.
Context: ...nsApi(configuration); ``` ### Test sign up Register your first user by signing ...

(QB_NEW_EN_HYPHEN)

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

222-227: Previous issue resolved: redirect URI is now correct.

The past review flagged line 226 as containing an invalid redirect URI (openid). The current version correctly shows http://localhost:5000/auth/callback, which matches the valid example on line 114. ✓


726-748: Previous issue resolved: heading and method name are now consistent.

The past review noted a mismatch between the section heading (previously plural "GetFlags") and the actual method name (singular "GetFlag"). The current version uses "GetFlag" consistently in both the heading (line 726) and code example (line 747). ✓

…nces

- Remove all environment variable configuration sections as SDK doesn't support them
- Update M2M token example to use direct configuration objects
- Fix Management API appsettings.json structure to match starter kit
- Remove fictional KindeClientBuilder references
- SDK requires programmatic configuration objects, not environment variables
Copy link
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 (3)
src/content/docs/developer-tools/sdks/backend/dotnet-sdk.mdx (3)

714-762: Address repeated sentence structure across method documentation.

Lines 714, 738, and 762 each start method descriptions with similar phrasing: "This method returns..." and "The method returns...". LanguageTool flags this repetition as a style concern. Consider varying the sentence structure to improve readability.

For example:

  • Line 714: "GetBooleanFlag returns a boolean value..."
  • Line 738: "This method retrieves a string value..."
  • Line 762: "Use GetIntegerFlag to retrieve the integer value..."

790-796: Simplify verbose wording in PackageReference section.

Line 792 uses "In order to use" which is more formal than necessary. Prefer the concise "To use" phrasing used elsewhere in the documentation for consistency.

Apply this diff:

-In order to use this SDK include following package reference in your `.csproj` file.
+To use this SDK, include the following package reference in your `.csproj` file.

975-977: Hyphenate compound modifier in section heading.

The section heading "Test sign up" should be hyphenated as "Test sign-up" to follow standard grammar conventions for compound modifiers.

Apply this diff:

-### Test sign up
+### Test sign-up
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 44cbec2 and c5d379d.

📒 Files selected for processing (1)
  • src/content/docs/developer-tools/sdks/backend/dotnet-sdk.mdx (2 hunks)
🧰 Additional context used
🪛 LanguageTool
src/content/docs/developer-tools/sdks/backend/dotnet-sdk.mdx

[style] ~737-~737: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...flag_name"); #### `GetStringFlag` This method returns a string value. csha...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~791-~791: Consider a more concise word here.
Context: ...ct dependencies #### PackageReference In order to use this SDK include following package ...

(IN_ORDER_TO_PREMIUM)


[grammar] ~975-~975: Use a hyphen to join words.
Context: ...nsApi(configuration); ``` ### Test sign up Register your first user by signing ...

(QB_NEW_EN_HYPHEN)

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

1-47: All past critical issues resolved and documentation structure significantly improved.

This update successfully addresses all three issues flagged in previous reviews:

M2M token retrieval (past line 226): Now correctly uses ClientCredentialsFlow with proper programmatic configuration instead of referencing undefined environment variables.

GetFlag section heading (past lines 726-748): Now consistently uses singular method name "GetFlag" throughout the section.

Environment variable definitions (past lines 154-184): M2M example now uses programmatic configuration via ClientCredentialsConfiguration instead of relying on undefined environment variables.

The expanded guide now provides clear, complete examples for PKCE authentication, M2M token retrieval, Management API usage, and ASP.NET Core integration. Configuration examples are properly structured in appsettings.json with both authentication and management API sections.

- Update PackageReference version in all examples
- Ensure documentation reflects latest SDK version
Copy link
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

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

712-734: Reduce repetition of "This method" in successive sections.

Lines 712 and 736 both begin descriptions with "This method returns," creating repetitive phrasing. Consider varying the sentence structure in the GetBooleanFlag and GetStringFlag sections (the GetIntegerFlag section already uses "The method" for variety).

Apply this diff to vary the phrasing:

 #### `GetBooleanFlag`
 
-This method returns a boolean value of the internal flag value.
+Returns a boolean value of the internal flag value.

 ```csharp
 ...

GetStringFlag

-This method returns a string value.
+Returns a string value.


---

`791-792`: **Use more concise phrasing for clarity.**

Line 791 uses "In order to use" which is verbose. The shorter form "To use" is clearer and more idiomatic.



Apply this diff:

```diff
-In order to use this SDK include following package reference in your `.csproj` file.
+To use this SDK, include the following package reference in your `.csproj` file.

975-975: Apply standard hyphenation to compound term.

Line 975 uses "Test sign up" but the compound term should be hyphenated as "Test sign-up" when used as a noun or heading.

Apply this diff:

-### Test sign up
+### Test sign-up
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c5d379d and ae7ae51.

📒 Files selected for processing (1)
  • src/content/docs/developer-tools/sdks/backend/dotnet-sdk.mdx (2 hunks)
🧰 Additional context used
🪛 LanguageTool
src/content/docs/developer-tools/sdks/backend/dotnet-sdk.mdx

[style] ~737-~737: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...flag_name"); #### `GetStringFlag` This method returns a string value. csha...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~791-~791: Consider a more concise word here.
Context: ...ct dependencies #### PackageReference In order to use this SDK include following package ...

(IN_ORDER_TO_PREMIUM)


[grammar] ~975-~975: Use a hyphen to join words.
Context: ...nsApi(configuration); ``` ### Test sign up Register your first user by signing ...

(QB_NEW_EN_HYPHEN)

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

1-47: Comprehensive documentation update looks solid.

The expansion from a basic SDK guide to a complete guide is well-structured. The shift from environment variable examples to programmatic configuration using proper SDK classes (ApplicationConfiguration, ClientCredentialsFlow, KindeClientBuilder) aligns well with the PR objective to match actual implementation. All past review issues (SDK version, GetFlag heading, environment variable setup, redirect URI) have been properly addressed.

- Replace broken link to /developer-tools/sdks/backend/dotnet-sdk-v1/ with generic message
- File dotnet-sdk-v1.mdx does not exist in the repository
- Update aside to reference current version documentation
@onderay onderay self-requested a review October 23, 2025 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant