Jolo
Jolo5mo ago

Convex Auth without React?

Is it possible to use Convex Auth, especially with OAuth without React? Every Auth provider from the docs uses React.
6 Replies
Michal Srb
Michal Srb5mo ago
Hey @Jolo, what's your use case?
Jolo
JoloOP5mo ago
Hey @Michal Srb, I want to use it with Astro. I know you can use React in Astro but for Auth.js it seems you need to have NextJS or Remix. Astro PR is still in the making for that. Clerk and Auth0 seem to be so heavy to learn, and I need another account. Lucia seems to be an option.
Michal Srb
Michal Srb5mo ago
This would have to be similar to the Convex Auth Next.js integration. You'll need to use cookies to store auth and refresh tokens. I am curious why you are choosing Astro, what are you building? Why not (say) Next.js or pure SPA?
Jolo
JoloOP5mo ago
@Michal Srb It aligns more with my mental model. It's fine if convex auth only works with React. I believe I can use it without NextJS
cameronm
cameronm5mo ago
@Michal Srb I have a use case that doesn't have to do with Astro specifically but just using Convex auth without React in general. I am building a simple REST Api to be able to query the convex database. I don't want to set up a react or next.js app for this. Just a simple server using the httpRouter and middleware to check credentials before running queries and mutations So I just want to set up some post and get routes to allow sign-up, sign-in, sign-out, get the current user, etc This way I can just use Postman to test auth This is just an internal app, and we're probably just going to use something like Retool to build the UI for speed so I don't want to added overhead of a next.js app right now This seems to be more of a documentation issue rather than anything else. Understandable since this is a new feature. Can implement this looking at existing source code for the react and next.js implementations. Is there any roadmap on extending the docs and implementing integrations for other frameworks?
Michal Srb
Michal Srb5mo ago
We might decide to add more integrations based on demand.

Did you find this page helpful?