rabin-nyaundi / NextJs-next-auth-authentication

11 stars 5 forks source link

Environment Variables #1

Open wattsmainsanglais opened 4 months ago

wattsmainsanglais commented 4 months ago

Hey, i read your medium article regarding this repo and thanks for the info. I had a question which the article doesn't address. There are 2 environment variables which you refer to in your scripts, process.env.NEXTAUTH_SECRET & process.env.NEXT_PUBLIC_NEXTAUTH_URL . What are these referring to and what do we need to input here. Thanks

Qurbonov commented 1 week ago

I found this: NEXT_PUBLIC_NEXTAUTH_URL='http://localhost:3000' DATABASE_URL="postgresql://postgres:passwd@db.name.supabase.co:5432/postgres" NEXTAUTH_SECRET="Z2knOid/f9JZWVeAQJmxXXEt+MV="

wattsmainsanglais commented 1 week ago

I found this: NEXT_PUBLIC_NEXTAUTH_URL='http://localhost:3000' DATABASE_URL="postgresql://postgres:passwd@db.name.supabase.co:5432/postgres" NEXTAUTH_SECRET="Z2knOid/f9JZWVeAQJmxXXEt+MV="

Hey thanks. After more research I implemented Next Auth with a combination of route handlers and server actions (with NextJs13 app router). For anyone looking, there's a great tutorial on it by 'Build saas with Ethan' on youtube