-
Notifications
You must be signed in to change notification settings - Fork 42
Update .NET SDK documentation to match actual implementation #595
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Update .NET SDK documentation to match actual implementation #595
Conversation
- 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
|
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 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. 📒 Files selected for processing (1)
WalkthroughUpdated 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
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
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
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. Comment |
There was a problem hiding this 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
📒 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 beKINDE_SCOPE(singular) or ifKINDE_SCOPESis 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
There was a problem hiding this 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
GetFlagmethod can be called," but the code example (lines 745–747) callsGetFlagon thekindeClientinstance, 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
📒 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 showshttp://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
There was a problem hiding this 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
📒 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
ClientCredentialsFlowwith 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
ClientCredentialsConfigurationinstead 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
There was a problem hiding this 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
📒 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
Description (required)
Related issues & labels (optional)
Summary by CodeRabbit