Is auth context passed to scheduled actions from server side queries/mutations?
I'm calling an action within a server side mutation using:
However when trying to retrieve the userIdentity within the action via:
It returns null.
Is the auth context only passed to the action when the action is called directly from the client? Or am I doing something wrong? I'm using Convex Auth btw.
3 Replies
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!
correct https://docs.convex.dev/scheduling/scheduled-functions#auth
the idea is that the function might run later, so the user might no longer be authenticated
thanks @Lee. Maybe it would be good to link to that from the docs on Function/actions + internal fns