Skip to content

Commit 56b7f9b

Browse files
authored
Update better-auth.md
We can actually set the basePath to be '/ 'now.
1 parent 0a9b2e0 commit 56b7f9b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

docs/integrations/better-auth.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,11 @@ import { passkey } from 'better-auth/plugins/passkey'
6868
import { Pool } from 'pg'
6969

7070
export const auth = betterAuth({
71-
basePath: '/api' // [!code ++]
71+
basePath: '/' // [!code ++]
7272
})
7373
```
7474

75-
Then we can access Better Auth with `http://localhost:3000/auth/api`.
76-
77-
Unfortunately, we can't set `basePath` of a Better Auth instance to be empty or `/`.
78-
75+
Then we can access Better Auth with `http://localhost:3000/auth`.
7976

8077
## Swagger / OpenAPI
8178

0 commit comments

Comments
 (0)