feat: New SDK: Golang#738
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThis pull request adds a new MDX documentation page for the Kinde Go SDK and registers the SDK in the site SDK list; the doc covers OAuth flows (authorization code, device, client credentials), session and JWT handling, middleware examples, access helpers, and a comprehensive API reference. ChangesGo SDK Documentation
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint skipped: no ESLint configuration detected in root package.json. To enable, add 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.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/content/docs/developer-tools/sdks/backend/go-sdk.mdx`:
- Line 252: The doc uses inconsistent spacing for authentication actions;
replace all occurrences of the split forms "sign in", "sign up", and "sign out"
with the hyphenated forms "sign-in", "sign-up", and "sign-out" (e.g., the line
that references KINDE_LOGOUT_REDIRECT_URI currently reads "sign out" — change to
"sign-out"); apply the same replacements at the other reported locations (around
lines 268–270, 340, and 850) to ensure consistent UI/docs wording.
- Line 117: Fix two phrasing typos in the markdown steps: change the step that
currently reads "1.Initialize the authorization code flow:" to "1. Initialize
the authorization code flow:" (add the missing space after "1."), and update the
sentence "Sent the user to the /register route" to "Send the user to the
/register route" (change "Sent" to "Send") in the Go SDK doc
(src/content/docs/developer-tools/sdks/backend/go-sdk.mdx) so the numbered step
and the instruction verb are correctly formatted.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 6728d534-a6a8-4b6b-a3d6-e309a1179c88
⛔ Files ignored due to path filters (1)
src/icons/go.svgis excluded by!**/*.svg
📒 Files selected for processing (2)
src/content/docs/developer-tools/sdks/backend/go-sdk.mdxsrc/data/sdkList.ts
Deploying kinde-docs-preview with
|
| Latest commit: |
cb2d775
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://47e2a454.kinde-docs-preview.pages.dev |
| Branch Preview URL: | https://koosha-add-go-sdk-doc-page.kinde-docs-preview.pages.dev |
There was a problem hiding this comment.
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 (1)
src/content/docs/developer-tools/sdks/backend/go-sdk.mdx (1)
296-307:⚠️ Potential issue | 🟠 Major | ⚡ Quick winFix logout docs to avoid implying local redirect terminates the Kinde hosted session.
authorization_code.Logout()only clears local tokens; it does not end the user’s Kinde hosted session.- Kinde requires a browser redirect to Kinde’s logout endpoint to terminate the hosted session (silent logout/ending without redirect isn’t supported).
KINDE_LOGOUT_REDIRECT_URIshould be documented as the post-logout redirect URI that must be registered as an “Allowed logout redirect URL”.- Reword the explanation around the redirect example (lines ~296–307) and ensure the flow/endpoint matches the required Kinde logout redirect pattern (also applies ~1074–1091).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/content/docs/developer-tools/sdks/backend/go-sdk.mdx` around lines 296 - 307, Update the docs to clarify that authorization_code.Logout() only clears local tokens and does not terminate the user's Kinde-hosted session; instead, show a browser redirect to Kinde’s logout endpoint (passing the registered post-logout redirect URI) to properly end the hosted session. Replace the current example redirect-to-local behavior with a flow that redirects the user to Kinde’s logout endpoint (including the post_logout_redirect_uri parameter set to KINDE_LOGOUT_REDIRECT_URI) and note that KINDE_LOGOUT_REDIRECT_URI is the post-logout redirect URI that must be registered as an “Allowed logout redirect URL.” Apply this wording/update wherever logout is described (including the authorization_code.Logout() example and the other referenced logout example).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/content/docs/developer-tools/sdks/backend/go-sdk.mdx`:
- Around line 241-248: The snippet using kindeAuthFlow.GetClient and subsequent
client.Get lacks error handling for the Get call and does not close the response
body; update the code around kindeAuthFlow.GetClient and client.Get to check the
error returned by client.Get before using resp, and ensure you call
resp.Body.Close (use defer resp.Body.Close() immediately after verifying resp !=
nil) to avoid leaking the response body; apply the same pattern to the
device-flow example where client.Get("https://your-api.com/protected-resource")
is used.
---
Outside diff comments:
In `@src/content/docs/developer-tools/sdks/backend/go-sdk.mdx`:
- Around line 296-307: Update the docs to clarify that
authorization_code.Logout() only clears local tokens and does not terminate the
user's Kinde-hosted session; instead, show a browser redirect to Kinde’s logout
endpoint (passing the registered post-logout redirect URI) to properly end the
hosted session. Replace the current example redirect-to-local behavior with a
flow that redirects the user to Kinde’s logout endpoint (including the
post_logout_redirect_uri parameter set to KINDE_LOGOUT_REDIRECT_URI) and note
that KINDE_LOGOUT_REDIRECT_URI is the post-logout redirect URI that must be
registered as an “Allowed logout redirect URL.” Apply this wording/update
wherever logout is described (including the authorization_code.Logout() example
and the other referenced logout example).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 35a7934d-bf91-4815-8cbf-2978500940ca
📒 Files selected for processing (1)
src/content/docs/developer-tools/sdks/backend/go-sdk.mdx
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/content/docs/developer-tools/about/our-sdks.mdx (2)
82-88: 💤 Low valueConsider alphabetizing the Native SDK list.
The Native section lists SDKs in non-alphabetical order (Android, iOS, React Native, Expo, Flutter). For consistency with the alphabetically ordered Back end section, consider reordering to: Android, Expo, Flutter, iOS, React Native.
📋 Alphabetical ordering
## Native - [Android SDK](/developer-tools/sdks/native/android-sdk/) +- [Expo SDK](/developer-tools/sdks/native/expo/) +- [Flutter SDK](/developer-tools/sdks/native/flutter-sdk/) - [iOS SDK](/developer-tools/sdks/native/ios-sdk/) - [React Native SDK](/developer-tools/sdks/native/react-native-sdk/) -- [Expo SDK](/developer-tools/sdks/native/expo/) -- [Flutter SDK](/developer-tools/sdks/native/flutter-sdk/)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/content/docs/developer-tools/about/our-sdks.mdx` around lines 82 - 88, Reorder the SDK items under the "## Native" section so they are alphabetized: change the list of link items referencing "Android SDK", "iOS SDK", "React Native SDK", "Expo SDK", and "Flutter SDK" to the sequence Android, Expo, Flutter, iOS, React Native; update the corresponding markdown list entries so their link text and URLs remain correct (e.g., "[Expo SDK](/developer-tools/sdks/native/expo/)") but appear in the new alphabetical order.
51-51: ⚡ Quick winConsider shortening the ai_summary.
The
ai_summaryis approximately 150+ words spanning 5 sentences. Metadata summaries are typically 1-2 concise sentences to ensure proper display in search results, suggestions, and page listings. The current length may cause truncation or layout issues in UI components that consume this field.✂️ Suggested concise alternative
-ai_summary: "Overview of all Kinde Software Development Kits (SDKs). Kinde SDKs simplify connecting your application to Kinde authentication. Most applications only need one SDK, though multiple SDKs can be used for multi-language products or separate frontend and backend services. Frontend SDKs include JavaScript and React. Backend SDKs cover Elixir, Express.js, .NET, Java, Next.js (App Router and Pages Router), TanStack Start, Nuxt, Node.js, PHP, Python, Remix, Ruby, SvelteKit, Go, and TypeScript. Native SDKs support Android, iOS, React Native, Expo, and Flutter. Other integrations include Apollo GraphQL and Node/Express GraphQL. A community-maintained Angular SDK is also available. Always verify that your tech stack versions are compatible with the SDK you choose before getting started." +ai_summary: "Overview of Kinde SDKs for frontend (JavaScript, React), backend (Elixir, Express.js, .NET, Go, Java, Next.js, TanStack Start, Node.js, PHP, Python, Remix, Ruby, SvelteKit, TypeScript, and more), native (Android, iOS, React Native, Expo, Flutter), and community-maintained integrations."🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/content/docs/developer-tools/about/our-sdks.mdx` at line 51, The ai_summary metadata is too long; replace the current multi-sentence paragraph in the ai_summary field with a concise 1–2 sentence summary that captures the essence (e.g., Kinde SDKs for frontend, backend, native, and other integrations) so it fits UI metadata constraints; locate and update the ai_summary key in src/content/docs/developer-tools/about/our-sdks.mdx (the ai_summary field) and ensure the new text is short, one or two sentences only.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/content/docs/developer-tools/about/our-sdks.mdx`:
- Around line 82-88: Reorder the SDK items under the "## Native" section so they
are alphabetized: change the list of link items referencing "Android SDK", "iOS
SDK", "React Native SDK", "Expo SDK", and "Flutter SDK" to the sequence Android,
Expo, Flutter, iOS, React Native; update the corresponding markdown list entries
so their link text and URLs remain correct (e.g., "[Expo
SDK](/developer-tools/sdks/native/expo/)") but appear in the new alphabetical
order.
- Line 51: The ai_summary metadata is too long; replace the current
multi-sentence paragraph in the ai_summary field with a concise 1–2 sentence
summary that captures the essence (e.g., Kinde SDKs for frontend, backend,
native, and other integrations) so it fits UI metadata constraints; locate and
update the ai_summary key in src/content/docs/developer-tools/about/our-sdks.mdx
(the ai_summary field) and ensure the new text is short, one or two sentences
only.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 28a280f7-6fb8-48d8-b1db-a919e5b3c25c
📒 Files selected for processing (1)
src/content/docs/developer-tools/about/our-sdks.mdx
This PR creates a new Go SDK to the list of Kinde SDKs.
Summary by CodeRabbit