Skip to main content

ConvexAuthServerConfig

Configuration for setupConvexAuthServer.

Properties​

PropertyTypeDescription
allowedOrigins?string[]Origins beyond the request's own Host trusted by every handler's CSRF origin check, for deployments where the two differ (e.g. a proxy that rewrites Host). See isTrustedOrigin.
convexUrlstringThe Convex deployment URL used server-side.
cookieOptionsAuthCookieOptionsAuth cookie attributes for every handler; secure is required.
refreshSessionRefreshSessionFnThe app's refreshSession mutation reference.
signInExposedSignInFn[]The sign-in functions of the methods to expose through the auth proxy. This should include all the Convex backend functions in your app that can issue auth sessions (e.g. account creation, log in with existing account…). Anything not listed is refused, so this allowlist is the proxy's entire API surface. Listing a function here is all the wiring an auth method needs.
signOutSignOutFnThe app's signOut mutation reference.