2,188 questions
0 votes
1 answer
52 views
NextAuth module augmentation not working in Turborepo monorepo (Property 'id' does not exist on type 'Session.user')
I’m using a Turborepo monorepo with a Next.js 15 App Router project (apps/web) and a shared packages/types package that contains my NextAuth module augmentation. However, TypeScript still gives this ...
0 votes
1 answer
61 views
NextAuth Google Login Redirect to Localhost instead of Production Domain
I am doing a project which will use Google Login in NextJs This is my setting in OAuth 2.0 and in amplify environment variables After I deployed the app and try to login It redirect me to http://...
0 votes
0 answers
56 views
How to persist data using PrismaAdapter and Authjs
I am trying to persist user data using PrismaAdapter with authjs. But getting following error. [auth][details]: {} [auth][error] SessionTokenError: Read more at https://errors.authjs.dev#...
0 votes
0 answers
113 views
How to avoid double login when using NextAuth (GitHub provider) with Giscus comment system?
We’re a small student-led open-source learning platform: "involutionhell" built by volunteers in our spare time. Our website uses NextAuth.js with a GitHub provider for authentication. ...
2 votes
0 answers
86 views
NextAuth sends two refresh requests simultaneously on page reload (refresh token rotation)
I'm using NextAuth with a custom backend in my Next.js app. When I refresh the page, two refresh requests are sent almost simultaneously. The first request correctly calls /auth/refresh and gets a new ...
0 votes
0 answers
81 views
google auth + firebase hosting + nextJS: State cookie was missing
I am developing an app in nextJS using next-auth for authentication. So far I only have Google as provider. The app is hosted using firebase hosting. Running the app in localhost works fine, but when ...
0 votes
0 answers
48 views
Need help updating token in next auth. (next.js app router)
I have a Next.js frontend and NestJS backend. In the backend there is token generation with refresh token rotation logic, and I want to use the same tokens in the frontend with NextAuth setup. Here’s ...
0 votes
1 answer
46 views
Unable to add a custom type to AdapterUser of MongoDBAdapter in "@auth/mongodb-adapter"
I have MongoDBAdapter as the adapter in my next-auth config, and I want to add a role to my user, so for that for that i made a next-auth.d.ts file, but it still shows me the error of type not ...
0 votes
0 answers
45 views
NextAuth (Auth.js v5 Beta) is building the callbackUrl using localhost:3000 in Production in Next.js v15.5
I have a Next.js v15.5 app directory frontend project with TypeScript and NextAuth v5 Beta. I have enabled the credentials provider from NextAuth, and everything works just fine locally, but in ...
0 votes
0 answers
84 views
How does authjs (next-auth) store session data?
I used next-auth@beta in my Next project. I also used credential provider to perform authentication against my database where it stores all the users in a MySQL table. Some basic information such as ...
0 votes
0 answers
30 views
T3 Stack Page Routing Boilerplate does not work
I am trying to create an app using the T3 stack. I am following the instructions in the T3 documentation which start by telling us to use the command npm create t3-app@latest. After doing that, we get ...
0 votes
1 answer
128 views
Next-Auth: JWT callback returns large token → split into .0, .1, .2 cookies
I’m using next-auth with the JWT session strategy and running into a problem with cookie size when storing multiple API tokens. Here’s my JWT callback: async jwt({ token, user }) { if (user) { ...
0 votes
1 answer
152 views
Middleware function from Auth.js exceeds Vercel 1 MB limit
My application uses Auth.js (NextAuth.js v5) to authenticate. In local, it works fine, but when deploying to Vercel problems arise with the "middleware function size". I tried to "...
0 votes
1 answer
118 views
Multiple authentication methods in NextJS with Auth.js
I want to be able to authenticate users with Oauth and protect the API endpoints with Basic authentication. How can I achieve this? My currently configuration doesn't work, unless I remove the Basic ...
0 votes
0 answers
44 views
Handling Invalid Login Errors in AWS Cognito with Auth.js (Formerly NextAuth) using SRP Authentication Flow
I'm working on creating a custom login and sign-up page using AWS Cognito with the SRP (Secure Remote Password) authentication flow. For handling the session, I’m using Auth.js (previously NextAuth), ...