Unable to use relative URL with Svelte
Hi! I've been encountering an issue regarding the relative URL. I'm not sure if this is a Sveltekit or Better Auth issue, so I'm sorry if this is the wrong place to seek help regarding it. I believe I may have updated the dependency since it used to work the day before, however the error occurred only after I updated the dependency.
Code:
The fatal error only happens client-side:
authClient.getSession(). I'm not sure how to proceed. They tend to happen within +layout.ts. Any help would be appreciated!
Error:
Solution:Jump to solution
Passing a
baseURL into the auth client configuration fixed the issue for me.
```typescript
import { adminClient } from "better-auth/client/plugins";
import { createAuthClient } from "better-auth/svelte";...2 Replies
Solution
Passing a
baseURL into the auth client configuration fixed the issue for me.
Hi, freshly installed here and this solution did not work for me. I'm completely out of ideas. Referring to the author of other question here: @Silvan
Never mind, I spelt
baseURL as baseUrl.