Skip to content

Commit 84a864d

Browse files
committed
feat: store sessions data in db
1 parent f2bfcd2 commit 84a864d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/auth/src/auth.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ export const auth = betterAuth({
177177
},
178178
expiresIn: 60 * 60 * 24 * 30, // 30 days
179179
updateAge: 60 * 60 * 24 * 3, // 1 day (every 1 day the session expiration is updated)
180+
storeSessionInDatabase: true, // Store session in database when secondary storage is provided
181+
preserveSessionInDatabase: false, // Preserve session records in database when deleted from secondary storage
180182
},
181183
secondaryStorage: {
182184
get: async (key) => {

0 commit comments

Comments
 (0)