Skip to content

Conversation

@mmailaender
Copy link
Contributor

@mmailaender mmailaender commented Nov 15, 2025

This pull request adds to the SvelteKit docs


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Summary by CodeRabbit

  • Documentation
    • Added "Authenticated requests" section to SvelteKit guide covering two authentication methods
    • Documented conditional query execution with authentication checks
    • Documented automatic token inclusion and authentication handling with expectAuth

✏️ Tip: You can customize this high-level summary in your review settings.

@mmailaender
Copy link
Contributor Author

mmailaender commented Nov 24, 2025

@erquhart are we ready to merge? 🙂

@coderabbitai
Copy link

coderabbitai bot commented Dec 6, 2025

Walkthrough

Updated the SvelteKit framework guide: corrected "SvelteKit" capitalization, simplified client reactive auth state logic, added an "Authenticated requests" section describing two approaches (conditional queries with useQuery and expectAuth via createSvelteAuthClient), and aligned server/client examples; no public APIs changed.

Changes

Cohort / File(s) Summary
Documentation: SvelteKit Authentication Guide
docs/content/docs/framework-guides/sveltekit.mdx
Capitalization and wording fixes for "SvelteKit"; simplified client auth-derived state (isLoading, isAuthenticated, currentUser); added an "Authenticated requests" section describing Option 1 (conditional useQuery with auth.isAuthenticated/skip) and Option 2 (expectAuth via createSvelteAuthClient) and adjusted server/client examples for consistency. Section appears duplicated in the file.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify whether the duplicated "Authenticated requests" section is intentional or should be removed.
  • Validate the example snippets for useQuery skip logic and createSvelteAuthClient({ expectAuth: true }) usage against current Convex APIs.
  • Check consistency with other framework guides (naming, phrasing, and recommended patterns).

Poem

🐰 I hopped through docs with careful paws tonight,
I fixed the caps and made the auth flow bright;
Two routes to guard requests, clear in sight,
One skips, one expects — both snug and tight.

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main changes: adding authenticated requests guidance and SSR documentation to the SvelteKit framework guide.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@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 b0149f7 and f8420b3.

📒 Files selected for processing (1)
  • docs/content/docs/framework-guides/sveltekit.mdx (1 hunks)
🔇 Additional comments (2)
docs/content/docs/framework-guides/sveltekit.mdx (2)

559-607: Verify: "Authenticated requests" section duplication claim.

The AI-generated summary indicates this section appears twice in the document. However, only one "Authenticated requests" section is visible in the provided code (lines 560–607 with Option 1 and Option 2). Please verify whether:

  1. A second identical/similar "Authenticated requests" section exists elsewhere in the file that's not shown in the diff
  2. The duplication claim in the summary is inaccurate

If duplication exists, consolidate into a single section to avoid redundancy.


560-607: Content and technical accuracy look solid.

Both authenticated request patterns are well-explained with clear use cases and working code examples. The conditional skip approach (Option 1) and expectAuth approach (Option 2) are complementary and appropriately documented for different app architectures.

@mmailaender mmailaender changed the title docs(sveltekit): add authenticated requests guide docs(sveltekit): add authenticated requests & SSR guide Dec 6, 2025
@mmailaender
Copy link
Contributor Author

The pull request now also includes a documentation section for SSR for auth state, added with 0.4.0 in convex-better-auth-svelte

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant