diff --git a/docs/content/docs/concepts/session-management.mdx b/docs/content/docs/concepts/session-management.mdx
index b49da8dc..05e5230f 100644
--- a/docs/content/docs/concepts/session-management.mdx
+++ b/docs/content/docs/concepts/session-management.mdx
@@ -27,8 +27,8 @@ import { betterAuth } from "better-auth"
export const auth = betterAuth({
//... other config options
session: {
- expiresIn: 1000 * 60 * 60 * 24 * 7 // 7 days,
- updateAge: 1000 * 60 * 60 * 24 // 1 day (every 1 day the session expiration is updated)
+ expiresIn: 60 * 60 * 24 * 7 // 7 days,
+ updateAge: 60 * 60 * 24 // 1 day (every 1 day the session expiration is updated)
}
})
```
diff --git a/docs/content/docs/concepts/typescript.mdx b/docs/content/docs/concepts/typescript.mdx
index 623b9021..3f9779b2 100644
--- a/docs/content/docs/concepts/typescript.mdx
+++ b/docs/content/docs/concepts/typescript.mdx
@@ -84,7 +84,9 @@ import { inferAdditionalFields } from "better-auth/client/plugins";
export const authClient = createAuthClient({
plugins: [inferAdditionalFields({
user: {
- role: "string"
+ role: {
+ type: "string"
+ }
}
})],
});
diff --git a/docs/content/docs/integrations/svelte-kit.mdx b/docs/content/docs/integrations/svelte-kit.mdx
index 8e77cd69..d51834bd 100644
--- a/docs/content/docs/integrations/svelte-kit.mdx
+++ b/docs/content/docs/integrations/svelte-kit.mdx
@@ -2,6 +2,7 @@
title: Svelte Kit Integration
description: Learn how to integrate Better Auth with Svelte Kit
---
+
Before you start, make sure you have a Better Auth instance configured. If you haven't done that yet, check out the [installation](/docs/installation).
### Mount the handler
@@ -17,14 +18,6 @@ export async function handle({ event, resolve }) {
}
```
-### Migrate the database
-Run the following command to create the necessary tables in your database:
-
-```bash
-npx better-auth migrate
-```
-
-
## Create a client
Create a client instance. You can name the file anything you want. Here we are creating `client.ts` file inside the `lib/` directory.
@@ -32,7 +25,7 @@ Create a client instance. You can name the file anything you want. Here we are c
```ts title="client.ts"
import { createAuthClient } from "better-auth/svelte" // make sure to import from better-auth/svelte
-export const client = createAuthClient({
+export const authClient = createAuthClient({
//you can pass client configuration here
})
```
@@ -43,18 +36,18 @@ Some of the actions are reactive. The client use [nano-store](https://github.com
### Example usage
```svelte