Skip to content

Conversation

@DaveVaval
Copy link

@DaveVaval DaveVaval commented Nov 28, 2025

  • The expo framework guide was missing an important property, baseUrl, from the auth.ts template file. For people who are new to convex and better auth it may not be obvious as to what goes in there, and I personally fell into that trap.

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
    • Updated Expo framework guide with improved Better Auth configuration, including proper setup of site URL from environment variables and trusted origins for enhanced security.

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

@coderabbitai
Copy link

coderabbitai bot commented Nov 28, 2025

Walkthrough

Documentation for the Expo framework guide is updated to retrieve the site URL from the CONVEX_SITE_URL environment variable and configure it as the base URL for the Better Auth instance while extending trusted origins.

Changes

Cohort / File(s) Summary
Expo Configuration Update
docs/content/docs/framework-guides/expo.mdx
Adds environment-based site URL retrieval; stores CONVEX_SITE_URL in internal constant; passes baseUrl: siteUrl to Better Auth instance and extends trustedOrigins to include the site URL.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Simple documentation update with configuration pattern changes
  • No logic changes or public API modifications
  • Straightforward environment variable integration

Poem

🐰 A rabbit hops through docs with glee,
Environment whispers: "Take me, see?"
Config flows smooth as morning dew,
From CONVEX_SITE_URL, something new!
Trust grows wider, origins align—
This Expo guide? Absolutely mine!

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 clearly and concisely describes the main change: adding a missing baseUrl property to the auth.ts template in documentation, which matches the objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 38aef00 and 39a612d.

📒 Files selected for processing (1)
  • docs/content/docs/framework-guides/expo.mdx (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: Redirect rules
  • GitHub Check: Header rules
  • GitHub Check: Pages changed
🔇 Additional comments (4)
docs/content/docs/framework-guides/expo.mdx (4)

89-90: Clarify environment variable naming in code vs. documentation.

The docs show setting EXPO_PUBLIC_CONVEX_SITE_URL (with the EXPO_PUBLIC_ prefix for Expo's client-side env vars), but the code at line 126 reads process.env.CONVEX_SITE_URL (without the prefix). If both need to be set separately for backend/frontend, this should be documented explicitly. If only one should be used, ensure consistency.

Also applies to: 101-101


125-126: Address fallback behavior and environment variable requirement.

The fallback to an empty string (process.env.CONVEX_SITE_URL || "") means misconfigured deployments may proceed silently rather than fail early. Consider whether this should:

  • Use a non-null assertion (like line 320 does: process.env.SITE_URL!) to catch missing configuration, or
  • Include a more explicit error or validation.

Additionally, ensure the environment variable name matches what's documented for users to set.


320-320: Align environment variable naming with the main Expo section.

The Expo Web support section uses process.env.SITE_URL while the primary Expo section uses process.env.CONVEX_SITE_URL. Ensure the variable names are consistent across both examples, or document why they differ.


133-133: Good addition of baseUrl and trustedOrigins.

The core fix—adding baseUrl: siteUrl and including siteUrl in trustedOrigins—is correct and addresses the PR's stated goal. Once the environment variable naming and fallback concerns are resolved, this should resolve the missing configuration issue for new users.

Also applies to: 139-139

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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

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