From 39a612d5e4417adad1371ceed40cfd536f6c8a92 Mon Sep 17 00:00:00 2001 From: DaveVaval Date: Fri, 28 Nov 2025 12:47:14 -0500 Subject: [PATCH] Added missing baseUrl property in the auth.ts template --- docs/content/docs/framework-guides/expo.mdx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/content/docs/framework-guides/expo.mdx b/docs/content/docs/framework-guides/expo.mdx index 0f76541..32fa2b4 100644 --- a/docs/content/docs/framework-guides/expo.mdx +++ b/docs/content/docs/framework-guides/expo.mdx @@ -122,18 +122,21 @@ description: Install and configure Convex + Better Auth for Expo. // The component client has methods needed for integrating Convex with Better Auth, // as well as helper methods for general use. export const authComponent = createClient(components.betterAuth); + // This is important: retrieve the HTTP actions url from environment variables + const siteUrl = process.env.CONVEX_SITE_URL || ""; export const createAuth = ( ctx: GenericCtx, { optionsOnly } = { optionsOnly: false }, ) => { return betterAuth({ + baseUrl: siteUrl, // disable logging when createAuth is called just to generate options. // this is not required, but there's a lot of noise in logs without it. logger: { disabled: optionsOnly, }, - trustedOrigins: ["your-scheme://"], + trustedOrigins: ["your-scheme://", siteUrl], database: authComponent.adapter(ctx), // Configure simple, non-verified email/password to get started emailAndPassword: {