Skip to content

feat: New SDK: Golang#738

Open
tamalchowdhury wants to merge 7 commits into
mainfrom
koosha/add/go-sdk-doc-page
Open

feat: New SDK: Golang#738
tamalchowdhury wants to merge 7 commits into
mainfrom
koosha/add/go-sdk-doc-page

Conversation

@tamalchowdhury
Copy link
Copy Markdown
Collaborator

@tamalchowdhury tamalchowdhury commented May 26, 2026

This PR creates a new Go SDK to the list of Kinde SDKs.

  • It adds detailed outlines for all three auth methods.
  • Creates detailed API references.

Summary by CodeRabbit

  • Documentation
    • Published a comprehensive Go SDK guide covering setup, installation, OAuth 2.0 flows (authorization code, device, client credentials), session behavior, JWT parsing/validation, middleware examples, token handling, and access/permission helpers.
    • Added a Go SDK entry to the SDK registry with route and icon metadata.
    • Revised the “Kinde SDKs” overview page: updated intro, reorganized Front-end/Back-end/Native listings, and refreshed community guidance.

Review Change Stack

@tamalchowdhury tamalchowdhury requested a review from a team as a code owner May 26, 2026 18:25
@github-actions github-actions Bot added the sdk label May 26, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 26, 2026

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

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 88d34ea1-6a0c-4e4a-8ebb-def5e5e0e4ab

📥 Commits

Reviewing files that changed from the base of the PR and between 3f8ee62 and cb2d775.

📒 Files selected for processing (1)
  • src/content/docs/developer-tools/sdks/backend/go-sdk.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/content/docs/developer-tools/sdks/backend/go-sdk.mdx

Walkthrough

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

Changes

Go SDK Documentation

Layer / File(s) Summary
Documentation Setup & Registry
src/content/docs/developer-tools/sdks/backend/go-sdk.mdx, src/data/sdkList.ts
MDX frontmatter, case-ignore comments, introduction, prerequisites, installation/import snippets, and registration of the Go SDK in the SDK list.
Quickstart & Authorization Code Flow
src/content/docs/developer-tools/sdks/backend/go-sdk.mdx
End-to-end quickstart covering app creation, session hooks, auth code flow initialization, login/callback routes, parsing/validating JWTs from session storage, route protection via IsAuthenticated, logout configuration, and auth-code API reference methods.
PKCE (Public Clients)
src/content/docs/developer-tools/sdks/backend/go-sdk.mdx
Optional PKCE usage and challenge method variants for public clients.
Device Authorization Flow
src/content/docs/developer-tools/sdks/backend/go-sdk.mdx
Device flow for CLI/limited-input devices with keychain-backed sessions: StartDeviceAuth, polling/ExchangeDeviceAccessToken, token retrieval, protected API calls, and device flow API docs.
Client Credentials (M2M) Flow
src/content/docs/developer-tools/sdks/backend/go-sdk.mdx
M2M setup, token fetching/auto-refresh via GetClient, GetToken inspection, Management API usage examples, and client-credentials API reference.
Session Management, Middleware, JWT, Access Helpers
src/content/docs/developer-tools/sdks/backend/go-sdk.mdx
Session storage behavior and hooks, Gin gin_kinde and net/http middleware examples, jwt package parsing/validation helpers, and account_api access/permission helpers.
API Reference (Auth Code / Device / Client Credentials)
src/content/docs/developer-tools/sdks/backend/go-sdk.mdx
Method-level API documentation for authorization code, device authorization, and client credentials flows (construction, token ops, helper middleware, and examples).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A fresh Go guide hops into view,
Flows and JWTs explained anew,
Middleware, tokens, sessions bright,
CLI and M2M all set to flight,
Docs snug as a carrot — ready to chew.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: adding comprehensive Go SDK documentation including setup, authentication flows, and API reference.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch koosha/add/go-sdk-doc-page

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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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

📥 Commits

Reviewing files that changed from the base of the PR and between b3f604c and 523c603.

⛔ Files ignored due to path filters (1)
  • src/icons/go.svg is excluded by !**/*.svg
📒 Files selected for processing (2)
  • src/content/docs/developer-tools/sdks/backend/go-sdk.mdx
  • src/data/sdkList.ts

Comment thread src/content/docs/developer-tools/sdks/backend/go-sdk.mdx Outdated
Comment thread src/content/docs/developer-tools/sdks/backend/go-sdk.mdx Outdated
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented May 26, 2026

Deploying kinde-docs-preview with  Cloudflare Pages  Cloudflare Pages

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

View logs

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 (1)
src/content/docs/developer-tools/sdks/backend/go-sdk.mdx (1)

296-307: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fix 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_URI should 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

📥 Commits

Reviewing files that changed from the base of the PR and between 523c603 and 0d6ccf0.

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

Comment thread src/content/docs/developer-tools/sdks/backend/go-sdk.mdx
@tamalchowdhury tamalchowdhury changed the title 🚧 Work in Progress: feat: Go SDK New SDK: Golang May 27, 2026
@tamalchowdhury tamalchowdhury changed the title New SDK: Golang feat: New SDK: Golang May 27, 2026
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

🧹 Nitpick comments (2)
src/content/docs/developer-tools/about/our-sdks.mdx (2)

82-88: 💤 Low value

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

Consider shortening the ai_summary.

The ai_summary is 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

📥 Commits

Reviewing files that changed from the base of the PR and between 508b985 and 3f8ee62.

📒 Files selected for processing (1)
  • src/content/docs/developer-tools/about/our-sdks.mdx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant