mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-09 20:27:44 +00:00
docs: imporvements
This commit is contained in:
@@ -9,7 +9,7 @@ Core better auth cookies like `session` and `csrf` will follow `betterauth.${coo
|
||||
|
||||
All cookies are `httpOnly` and `secure` if the server is running in production mode.
|
||||
|
||||
### Cross Subdomain Cookies (Expermental 🧪)
|
||||
### Cross Subdomain Cookies (🧪 Expiremental)
|
||||
|
||||
By default, cookies are not shared between subdomains. However, if you need to access the same session across different subdomains, you can enable cross-subdomain cookies. To do this, set `crossSubDomainCookies` to `true` in the `advanced` object of the auth options.
|
||||
|
||||
@@ -28,7 +28,7 @@ export const auth = await betterAuth({
|
||||
})
|
||||
```
|
||||
|
||||
### Disable CSRF Cookie (Not Recommended)
|
||||
### Disable CSRF Cookie (⚠︎ Not Recommended)
|
||||
|
||||
If you want to disable the CSRF cookie, you can set `disableCsrfCheck` to `true` in the `advanced` object in the auth options.
|
||||
|
||||
|
||||
@@ -32,15 +32,13 @@ export const auth = await betterAuth({
|
||||
|
||||
Migrate your database to add the necessary tables and fields.
|
||||
|
||||
This will create the following tables:
|
||||
|
||||
- **organization**: Stores the organization's data. Includes the name, slug, logo, and other information.
|
||||
- **member**: Stores the members of the organization. Includes the user id, organization id, role, and other information.
|
||||
- **invitation**: Stores the invitations sent to users. Includes the email, role, organization, the status, and other information.
|
||||
|
||||
If you're using the CLI:
|
||||
|
||||
```bash
|
||||
npx better-auth migrate
|
||||
```
|
||||
|
||||
If you need to create the tables manually, see the [Schema](#schema) section.
|
||||
</Step>
|
||||
|
||||
<Step>
|
||||
|
||||
@@ -37,6 +37,19 @@ The passkey plugin implementation is powered by [simple-web-authn](https://simpl
|
||||
})
|
||||
```
|
||||
</Step>
|
||||
<Step>
|
||||
### Migarate database
|
||||
|
||||
Migrate your database to add the necessary tables and fields.
|
||||
|
||||
If you're using the CLI:
|
||||
|
||||
```bash
|
||||
npx better-auth migrate
|
||||
```
|
||||
|
||||
If you need to create the tables manually, see the [Schema](#schema) section.
|
||||
</Step>
|
||||
<Step>
|
||||
### Add the client plugin
|
||||
|
||||
|
||||
@@ -61,10 +61,13 @@
|
||||
"listhen": "^1.7.2",
|
||||
"mongodb": "^6.9.0",
|
||||
"next": "^14.2.8",
|
||||
"pg": "^8.12.0",
|
||||
"better-sqlite3": "^11.3.0",
|
||||
"prisma": "^5.19.1",
|
||||
"react": "^18.3.1",
|
||||
"solid-js": "^1.8.18",
|
||||
"tsup": "^8.2.4",
|
||||
"mysql2": "^3.11.0",
|
||||
"typescript": "5.6.1-rc",
|
||||
"vitest": "^1.6.0",
|
||||
"vue": "^3.5.0"
|
||||
@@ -86,7 +89,6 @@
|
||||
"@simplewebauthn/server": "^10.0.1",
|
||||
"arctic": "2.0.0-next.9",
|
||||
"better-call": "0.2.3-beta.10",
|
||||
"better-sqlite3": "^11.3.0",
|
||||
"c12": "^1.11.2",
|
||||
"chalk": "^5.3.0",
|
||||
"commander": "^12.1.0",
|
||||
@@ -95,13 +97,11 @@
|
||||
"dotenv": "^16.4.5",
|
||||
"jose": "^5.7.0",
|
||||
"kysely": "^0.27.4",
|
||||
"mysql2": "^3.11.0",
|
||||
"nanoquery": "^1.3.0",
|
||||
"nanostores": "^0.11.2",
|
||||
"oauth4webapi": "^2.12.0",
|
||||
"ora": "^8.0.1",
|
||||
"oslo": "^1.2.1",
|
||||
"pg": "^8.12.0",
|
||||
"prompts": "^2.4.2",
|
||||
"zod": "^3.22.5"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user