All Questions
68
questions
0
votes
0
answers
11
views
Next Auth signout not working in vercel but ok in local
I am using nextAuth for signIn and signout.
My problem is that users can signIn properly (for example email:[email protected] pswd:0911111111), but can never signout in vercel, it will only redirect to ...
0
votes
0
answers
13
views
NextAuth Middleware Failing to Retrieve Token in Production
I'm using NextAuth in a Next.js application with a custom credentials provider. Everything works perfectly on my local development environment, but in production (deployed on Vercel), the middleware ...
0
votes
0
answers
11
views
MongoDB + nextAuth problem when npm run build
im using Next.js 14.2.4
this is mine app/api/auth/[...nextauth]/route.ts
in npm run dev all works fine, but when I go npm run build I get this error:
app/api/auth/[...nextauth]/route.ts
Type error: ...
2
votes
1
answer
86
views
+250
Response Set-Cookie not working, but only on Cloudflare Pages/Workers
I am working on a simple app with Auth.js and Next.js. In specific, I am using it with WebAuthn authentication.
So, I have a pretty similar auth.ts setup:
export const { handlers, signIn, signOut, ...
0
votes
0
answers
17
views
Can't sign in with Spotify (Deployed on Vercel)
I created a music listening web using nextjs14, prisma, next-auth, and Spotify API.
tried deploying using vercel and resolved the errors that appeared intermittently and there were no errors in the ...
1
vote
0
answers
284
views
Next-auth and TRPC middleware in NextJS app router
I am quite new to Next/TRPC and have followed various guide to get next-auth working with it. (using app router)
// server/trpc.ts
import { TRPCError, initTRPC } from '@trpc/server';
import { type ...
0
votes
0
answers
64
views
Next Auth API routes 404 not found in production
It's working fine in local but when I deployed the app in production with the right url in .env, It won't let me sign in since it cannot find or access the api route in production.
69-70effe13903bb54a....
1
vote
2
answers
498
views
Next.js 14 accessing session information from component
I have a next.js 14 project with these tools:
Typescript
Vercel (with a postgres db)
Prisma
App router
Next auth (v5.0 beta)
Server actions & react server components
I'm fairly new to next.js ...
-1
votes
1
answer
43
views
Error deploy NextJS14 app toVercel - Unexpected token < in JSON at position 0
Here is the problem:
next: 14.1.4
next-auth: 4.24.7
node version: 20
my structure auth folder:
i got no error when run with npm run dev
i've research for this problem for three days, but i still ...
3
votes
0
answers
265
views
Type error: Route "app/api/auth/[...nextauth]/route.ts" does not match the required types of a Next.js Route while deploying Next app with NextAuth
I'm deploying my Next App with NextAuth on Vercel but I get this error when uploading my project and I don't understand why! If anyone can help me that would be great!
It perfectly works on my ...
2
votes
1
answer
480
views
My Next.js middleware works only in localhost, how to make it works in Vercel deploy too?
I am learning Next.js and I just made a simple middleware.ts:
export { default } from 'next-auth/middleware';
export const config = { matcher: ['/items', '/dashboard'] };
The problem is: the ...
1
vote
0
answers
12
views
Production Environment Works Fine, Local Development Breaks: Fetch Issues Causing Page Breakage
My application functions smoothly in the production environment, however, encounters issues in local development. Recently, I've been troubleshooting fetch-related problems that result in the entire ...
0
votes
0
answers
111
views
Why am I getting 500 code errors and unable to login after 2 years of a working project? (NextAuth)
I recently posted regarding this in the Next.js discord but wasn't able to find a solution. The issue I'm having has me completely stumped. I'm not sure what the source of the issue is or what further ...
1
vote
0
answers
108
views
Unable to login in vercel using next auth
Auth is working fine in development but in production it is not working. I get toast success pop up but still it does not login. I have added NEXTAUTH_URL in vercel environment but even that did not ...
0
votes
0
answers
50
views
login using next auth in vecel deployed app is rectedting to localhost (http://localhost:3000/api/auth/signin)
I have deployed a next js app using vercel (Link) when i click on login button it is redirecting to http://localhost:3000/api/auth/signin .
I have tried updating the NEXTAUTH_URL environment variable ...