Try signing in with a different account.
I just got setup with my first t3 app ever, sorry if I'm a noob. I've created two different discord apps for auth. The one I have in my dev environment works perfectly and I'm able to sign in. I've got the environment variables and redirect url setup correctly. I also have a deployed production one which is hosted on vercel (https://t3-scouter.vercel.app/). I set it up the exact same way, setup the new environment variables, and the new redirect URL as: https://t3-scouter.vercel.app/api/auth/callback/discord instead of localhost:3000/. And I get this error.
I tried switching from sqlite to mysql on planetscale (like the tutorial), and it all seems ot be working locally, but for some reason the deployed one doesn't work. My DATABASE_URL is the same in my dev and prod environments right now since I'm just trying to get it to work, and then I'll go and create a second prod db over at planetscale.
11 Replies
This is my schema as well.
share gh
sorry what's gh? im a total noob D:
oh shoot. i may have just fixed it
github *
aah nice : )
i literally just commented out one thing and pushed it
and now it works
lolol
Solution
id_token String? // @db.Text
ah
i was browsing other people's posts abt this problem and one person had their schema and it was commented out
instead of uncommented
so now my schema is:
and it works
no clue why that was the fix - i dont really know what im doing here
what's really strange is it was working in my dev environment even when that wasnt commented out
Oh well. This might cause issues later but we'll see. Thanks for the help ig
For me, it was returning this
Error
from Prisma:
It seems that the Session
model is defined in your Prisma schema but the corresponding table has not been created in your SQLite database.
To resolve this issue, you can follow these steps:
1. Run Migrations: Ensure that your database schema is up to date with your Prisma schema. You can do this by running the following command:
This command will create the necessary tables in your database based on your Prisma schema.
2. Push Schema Changes: If you are not using migrations and just want to push the current schema to the database, you can use:
3. Check Database Connection: Ensure that your DATABASE_URL
in the .env
file is correctly pointing to your SQLite database.
4. Prisma Studio: You can also use Prisma Studio to visually inspect your database and confirm that the Session
table has been created:
After performing these steps, the Session
table should exist in your database, and the error should be resolved.