Skip to content

Conversation

@smaccoun
Copy link

@smaccoun smaccoun commented Oct 7, 2025

Sorry to be that guy, but this is a mostly AI generated PR. I did review it though and it seems reasonable to me. At a minimum would like to get the conversation going

Motivation

We rely on Convex Auth for passwordless flows where a user redeems a magic link and should land in the app already authenticated (think clinician emailing a patient an assessment link). In hosted/E2E setups the internal.auth.store mutation runs in a worker that never sees runtime process.env mutations, so token minting fails with “Missing environment variable CONVEX_SITE_URL.” That breaks the magic-link UX and forces clients to call internal APIs to work around it. Pushing the site URL through config and exposing a supported issueTokens helper keeps these flows working across environments without relying on internals.

Summary

  • fix auth:store workers skipping token minting when runtime processes can't see CONVEX_SITE_URL by threading site/custom auth url data through call stack
  • normalize site URL handling so JWT issuer, OAuth redirects, and cookie names all use config overrides (or CUSTOM_AUTH_SITE_URL fallback) instead of direct process.env reads
  • provide a public issueTokens(actionCtx, {userId, sessionId?}) helper so apps avoid internal.auth.store and still get tokens with the right issuer metadata; add the convex test hook covering it

Testing

  • not run

@vercel
Copy link

vercel bot commented Oct 7, 2025

@smaccoun is attempting to deploy a commit to the Convex Team on Vercel.

A member of the Team first needs to authorize it.

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