sandeep34S
Convex Community7mo ago
3 replies
sandeep34

Using clerk + convex auth along with Tauri app (Login via Browser)

I am using Clerk Convex Integration
https://clerk.com/docs/integrations/databases/convex

Now, I am looking for workflows where I can login via Browser into Tauri webapp (Unbundled).

I tried using Clerk as oAuth provider, where I can render a button my webpp "Login via browser"
This navigates to browser for Authentication (which opens my clerk sign in / sign up page)
In return I get code and state, which I can use for exchanging with Token via Backend

I am comminicating code and state via Deep linking.

But here is the problem I am facing.
Even after exchanging Code for Token, I am unable to set the session in the Tauri app.

Clerk's setActive method is not seems to be working. Probably because Convex is working along with Clerk.

So how to manage session via Convex. I tried clerk.setAuth with a fetcher function, but didn't seemed to work as well.

Any recommendations, or any other alternative workflows?
Learn how to integrate Clerk into your Convex application.
Integrations: Integrate Convex with Clerk
Was this page helpful?