Closed arepp23 closed 10 months ago
Can you first verify that it’s an issue with Lucia and not how you setup your database connection?
@pilcrowOnPaper I have the app connected to the vercel postgres database already and can read and write data no problem.
Can you check whether you can query your database in the middleware?
Yes I am able to query another table from the middleware function
Are you querying using db
instead of sql
?
I'm able to query data with both db
and sql
from the middleware
Can you insert data with db
and use transactions?
I realized I wasn't logging the actual error. It's saying [error: column "email" of relation "auth_user" does not exist]
I made the tables using the schemas shown here: https://lucia-auth.com/database-adapters/postgres/
You have to add the email
and email_verified
column to the user table
Package
lucia-auth
Describe the bug
When attempting to use lucia with Next.js and vercel postgres, I'm getting the following:
Here's how I have it configured in my code, following the documentation example:
I have created the three necessary tables in vercel postgres already.