Make sure to set correct dataType for id on sessions table
#1578
furkandmrblk
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When implementing the username + password flow with Lucia and you use Postgresql (in my case with tRPC, Drizzle & Neon) make sure to set the
dataTypeforidin your sessions table totext()instead ofuuid().This had resulted in the following error when invoking
createSession():Not sure if this is a bug or intended behavior, but as
dataTypeforpgColumnis specified asanyit should've worked either way (when erroring it wasPgUUID, now works withPgText).Maybe it'll help save some time for someone regarding this particular issue.
Beta Was this translation helpful? Give feedback.
All reactions