#ConvexAuth on third party server

2 messages · Page 1 of 1 (latest)

grand glen
#

I have an external server (Hono), I would like to consume my existing ConvexAuth on this server. I don't know if this is possible but I'm open to ideas and suggestions.

I already use ConvexAuth for my application to protect mutations and actions. I want to expose a 3rd party server convex to the client and accept request only from authenticated users from Convex Auth. Is this possible?

buoyant needle
#

One solution here would be to write a Convex query that loads the authenticated user, and then call the query from your external server using the ConvexHttpClient and setAuth.

I'm assuming you've already figured out how to send the access token generated by Convex Auth with your external server (like sending it in a header), so you'd just need to grab that and forward it to your query call