Closed 8bittitan closed 7 months ago
Does it work properly if you don't configure the expiration?
What column type are you using for expiresAt
? It has to be an Int
No, even without the configuring the session expiration it is still giving a timestamp of 1709392662
unfortunately.
I do have the expiresAt
column set to an int as below:
export const session = sqliteTable("session", {
id: text("id").notNull().primaryKey(),
userId: text("user_id", { length: 255 })
.notNull()
.references(() => user.id),
expiresAt: integer("expires_at").notNull(),
});
I also confirmed that switching to Postgres using Neon works as expected.
Timestamps are stored in seconds, not milliseconds, so 1709392662
is correct
Oh my 🤦. There must be something else going on on my end then. Sorry about that!
Package
lucia
Describe the bug
Using the following config options:
The
expires_at
column on thesession
table always defaults toJan 20 1970
.This happens regardless of setting a
sessionExpiresIn
option. The actionsessionCookie
expiration adheres as expected, only the DB one is incorrect.Bun: 1.0.25 adapter: @lucia-auth/adapter-drizzle DB: Bun SQLite