next-auth database
Unanswered
Rex posted this in #help-forum
RexOP
how do i use next-auth with postgresql?
16 Replies
I use Prisma for my MySQL database, and it's got docs for PostgreSQL as well! https://www.prisma.io/docs/concepts/database-connectors/postgresql
Yeah and then use an adapter to connect to next-auth https://authjs.dev/reference/adapter/prisma
RexOP
i see, thank you both
@Rex you get it working? 😄
@SkippTekk <@774352602678558790> you get it working? 😄
RexOP
ive been looking into prisma, but havent gotten too far
It's neat. it has it's moments where you wanna bash in the keyboard to get things working
@SkippTekk It's neat. it has it's moments where you wanna bash in the keyboard to get things working
RexOP
so i believe i've set up everything necessary but its not working
i've set up my adapters and everything, but when i authenticate and check my database later, i don't see any rows
not sure where im going wrong with this
Bombay
There is a starter template on the Vercel site with Next.js, Prisma, Postgres, and NextAuth.js: https://vercel.com/templates/next.js/prisma-postgres-auth-starter
@Bombay There is a starter template on the Vercel site with Next.js, Prisma, Postgres, and NextAuth.js: https://vercel.com/templates/next.js/prisma-postgres-auth-starter
RexOP
i have most of that in my code already, but its just not working
Bombay
Do you have the db set up and the environment variables typed in? https://github.com/vercel/nextjs-postgres-auth-starter/blob/main/.env.example
RexOP
yes
i think its a miscommunication somewhere between next-auth and prisma
but im not sure where
theres no logs or anything