Nuxt + Fastify integration guide
Hi, I'm trying to use better-auth with nuxt and fastify. First of all I need the apps to be separate as backend might in future need to work with many clients, not only one webapp. Now to the problem. The flow is like this. On the Nuxt side I've created authClient like this.
Current usage is ultra simple.
Now to the backend side. Here is auth instance set up.
I've basically tried in every place to force redirect from Google to be sent to my backend, which knows where to pass it further (to my frontend), but all the time I'm getting referenced with a code to localhost:3000 (frontend) instead of localhost:3001 (backend). When I change in the url the port it goes correctly from there.
0 Replies