Biruk
Biruk2mo ago

How to Automatically Pass a Token to Convex Server in fetchQuery and Other Functions

Hey, is it possible in Convex to pass a parameter (like a token) to the Convex server in fetchQuery and other functions without manually adding it each time? Context: I'm building my own auth due to some unique requirements, and I need to pass a token. I didn't want to manually include it in every request.
2 Replies
Convex Bot
Convex Bot2mo ago
Thanks for posting in <#1088161997662724167>. Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets. - Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.) - Use search.convex.dev to search Docs, Stack, and Discord all at once. - Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI. - Avoid tagging staff unless specifically instructed. Thank you!
erquhart
erquhart5w ago
You would need to make a wrapper function that does this for you.

Did you find this page helpful?