Expose issueTokens helper and plumb runtime site URL #256
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Testing