base path not resolving correctly
My server is running on port
8080
and client on 5173
, I have created server auth instance by providing it basePath as "/auth"
and created a route "/auth/*"
.
For authClient instance i have provide full baseUrl as http://localhost:8080/auth
.
When i signin with google it sets the cookie but redirects to localhost:8080/auth. what is wrong here?Solution:Jump to solution
I'm using express, and my baseURL in createAuthClient was 'http://localhost:3000' without a '/auth' in front of it. Another issue you might have is that you have to set the callback URL to a full URL. i.e.
```
const { error } = await authClient.signIn.social(
{...
2 Replies
Solution
I'm using express, and my baseURL in createAuthClient was 'http://localhost:3000' without a '/auth' in front of it. Another issue you might have is that you have to set the callback URL to a full URL. i.e.
instead of just
Not sure if this is helpful, but I had a similar issue and that's what worked for me.
thanks putting callbackUrl fixed it!