Picture of data in db:
![image](https://github.com/lucia-auth/lucia/assets/15883173/8244a11e-006d-4d9c-8c74-b97555f83379)
I tried to run a similar SQL query on the file:
SELECT user.*, session.*
FROM session
INNER JOIN user ON session.user_id = user.id
WHERE session.id = "oldpey50k1u7351frjg3n5xmmmnwljgxa8a6w2b8";
this is what I get:
id
provider_id
provider
id
user_id
expires_at
r3e9l9mpwwef1i8
15883173
github
oldpey50k1u7351frjg3n5xmmmnwljgxa8a6w2b8
r3e9l9mpwwef1i8
1713552867
—which looks right. I ran this both using an external program, and from within my script directly on the (D1) db object.
Of course, once this reaches validateSession, it immediately fails here due to expiresAt being Invalid Date.
There's a test that should catch this, but I can't run pnpm on my work machine, so I can't verify/test. Has anyone else ran into this issue? Is this possibly an issue with Drizzle? I feel like I'm going crazy.
Package
@lucia-auth/session-drizzle
Describe the bug
Session schema as per docs:
It seems that the issue lies within this query. It returns:
where the original unmodified object looks like this:
I tried to run a similar SQL query on the file:
this is what I get:
—which looks right. I ran this both using an external program, and from within my script directly on the (D1) db object.
Of course, once this reaches
validateSession
, it immediately fails here due toexpiresAt
beingInvalid Date
.There's a test that should catch this, but I can't run pnpm on my work machine, so I can't verify/test. Has anyone else ran into this issue? Is this possibly an issue with Drizzle? I feel like I'm going crazy.