mirror of
https://github.com/better-auth/better-auth.git
synced 2026-10-20 20:26:55 -05:00
docs: document oauthConfig in options.mdx (#5947)
This commit is contained in:
@@ -34,6 +34,15 @@ same browser session that started it.
|
||||
* Check that cookies are not blocked by browser settings or privacy modes.
|
||||
* Ensure you're starting and ending the OAuth flow in the same browser session.
|
||||
|
||||
### Skip state cookie check
|
||||
|
||||
If you know what you are doing, you can skip the state cookie check by
|
||||
setting the `advanced.oauthConfig.skipStateCookieCheck` option to `true` in your auth config.
|
||||
|
||||
<Callout type="warn">
|
||||
Please note that this is a security risk and should only be enabled if you know what you are doing.
|
||||
</Callout>
|
||||
|
||||
### Production Debug
|
||||
|
||||
Head to your production site, and use your browser's DevTools → Application → Cookies to confirm:
|
||||
|
||||
@@ -465,6 +465,10 @@ export const auth = betterAuth({
|
||||
httpOnly: true,
|
||||
secure: true
|
||||
},
|
||||
oauthConfig: {
|
||||
skipStateCookieCheck: false,
|
||||
storeStateStrategy: "database"
|
||||
},
|
||||
cookiePrefix: "myapp",
|
||||
database: {
|
||||
// Use your own custom ID generator, disable generating IDS so your database will generate them, or use "serial" to use your database's auto-incrementing ID, or "uuid" to use a random UUID.
|
||||
@@ -487,7 +491,8 @@ export const auth = betterAuth({
|
||||
- `cookies`: Customize cookie names and attributes
|
||||
- `defaultCookieAttributes`: Default attributes for all cookies
|
||||
- `cookiePrefix`: Prefix for cookies
|
||||
- `generateId`: Function to generate a unique ID for a model
|
||||
- `database`: Database configuration options
|
||||
- `oauthConfig`: OAuth configuration options
|
||||
|
||||
## `logger`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user