DieMantra
DieMantra2w ago

Password provider async callbacks

I have a weird app requirement from a client where they much login using convex auth with the password provider, whilst also logging in to another api that returns an auth token to authenticate requests to another API. My plan was to accept the dual credentials at login, get the auth token, store it in the users table and then use it from there. I am wondering if there is anywhere in the sign flow that allows async fetching of this token and setting it on the user table? As far as i could see there was only an async callback for user creation or update, but that doesnt work when doing credentials. It would also be a benefit to be able to make a call to this external api when the convex auth session is being refreshed, to test if the auth token is still valid, if not i could terminate the convex session at the same time. At the moment i just do these two logins separately on the client and then call a mutation from the client once both have logged in to update the user table with the auth token.
1 Reply
Convex Bot
Convex Bot2w 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!

Did you find this page helpful?