Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
50 views

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 ...
total_idiot's user avatar
0 votes
1 answer
61 views

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://...
EQ0920's user avatar
  • 124
0 votes
0 answers
56 views

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#...
himu73's user avatar
  • 75
0 votes
0 answers
113 views

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. ...
Loong Loong's user avatar
2 votes
0 answers
85 views

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 ...
milad's user avatar
  • 133
0 votes
0 answers
81 views

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 ...
martin's user avatar
  • 40
0 votes
0 answers
48 views

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 ...
Sudeep Lamichhane's user avatar
0 votes
1 answer
45 views

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 ...
Striker's user avatar
  • 11
0 votes
0 answers
45 views

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 ...
Stoman's user avatar
  • 173
0 votes
0 answers
83 views

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 ...
sc1013's user avatar
  • 1,146
0 votes
0 answers
30 views

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 ...
questionsAsker's user avatar
0 votes
1 answer
128 views

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) { ...
Sanjay's user avatar
  • 1
0 votes
1 answer
152 views

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 "...
Leocruz 's user avatar
0 votes
1 answer
118 views

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 ...
dascolagi's user avatar
  • 157
0 votes
0 answers
44 views

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), ...
Sundar Gopal Nag's user avatar
0 votes
2 answers
201 views

I’m working on a Next.js 14 app with the App Router and next-auth@5. I followed the official Next.js Learn guide on authentication, except I replaced email with username in the database. I set up ...
Noctyris's user avatar
0 votes
0 answers
40 views

I implemented NextAuth in my application for basic authentication and authorization. The system works perfectly when I didnt add any basePath in NextConfig located in next.config.ts but when I added ...
Abdul Rahuman's user avatar
1 vote
0 answers
125 views

I develop a Next.js app with Auth.js v5 security. I use jwt strategy for sessions I'm trying to achieve lightweight authorization checks in my Next.js app by injecting user roles into JWT payload ...
Ludmila Kurochkina's user avatar
0 votes
1 answer
149 views

I created a Next.js Project to test my keycloak server. The programm works fine and does exactly what I want. Until I add the basePath "/app" in my next.config.js: const basePath = "/...
Ruffyg's user avatar
  • 113
2 votes
2 answers
549 views

I am developing an application to learn NextJS and getting deeper to its concepts. Im following a course that teaches most needed things to build a full-stack application using NextJS. The stack I'm ...
Borzoo Moazami's user avatar
0 votes
0 answers
34 views

I'm using NextAuth v5 with Next.js 15.3.2 for authentication with JWT strategy. Everything works as expected when running the app locally using: npm run dev The req.auth object in my middleware is ...
Jack's user avatar
  • 11
0 votes
1 answer
66 views

How to set custom expiry time for jwt in next-auth, i want to setup the time based on remember me marked on the frontend, but when setting token.exp in jwt callback nothing happens, the token expiry ...
Zain Amjad's user avatar
0 votes
0 answers
82 views

Our Next.js app (app router) is using next-auth for security with a Keycloak oauth provider. We're using Next API routes to fetch from another REST API for data fetching and manipulation. What is the ...
Carter Smith's user avatar
0 votes
0 answers
29 views

I'm building an ecommerce site using Next.js App Router (v13+). About 80% of my pages are static and ideally should remain static for performance and caching benefits. However, when I fetch the user ...
abdelrhman hisham's user avatar
0 votes
1 answer
52 views

I'm using next-auth with middleware.ts in a Next.js App Router project. Despite putting middleware.ts at the root of the project, it is not being triggered, and protected routes like /profile are ...
Maryem Hadj Wannes's user avatar
0 votes
0 answers
48 views

I am trying to create a LinkedIn based authentication using typescript, but since long I am failing. My code is successfully able to give me login option using LinkedIn but when I login, it just gives ...
user30864783's user avatar
0 votes
0 answers
21 views

enter image description here GOOGLE_CLIENT_ID=********.apps.googleusercontent.com GOOGLE_CLIENT_SECRET=******** AUTH_SECRET=JSR+v4MCFEAMAOMtEcXYeh5nJCnVrKJaY0czK1byVhI= DATABASE_URL=postgresql://user:...
Ishan Shetty's user avatar
0 votes
1 answer
74 views

How to implement lazy initialization of authjs (v5 beta) config in nextjs 14 without encountering the error Error: The Middleware "/src/middleware" must export a middleware or a default ...
Tejas's user avatar
  • 27
0 votes
2 answers
52 views

I am a newbie with next-auth. my app still uses a frontend and backend separation, and I'm using CredentailProvider for login to obtain an access token from the backend server. when I fetch data from ...
aboyo's user avatar
  • 1
4 votes
0 answers
295 views

I have a Turbo repo with the following structure: - apps - web - Next.js 15 - packages - @repo/database - Prisma v6.8 - @repo/authjs-core - Auth.js v5 - Providers - ...
Michal Masar's user avatar
0 votes
0 answers
108 views

I'm implementing authentication middleware in a Next.js (v13+) application using NextAuth.js, and I'm encountering an error when trying to validate the session token. The error occurs in the oidc-...
user avatar
1 vote
0 answers
147 views

I'm using sidebase's nuxt-auth to setup authentication, and everything works fine in development mode, but not when deployed with npm run build. Specifically, the getServerSession() function always ...
Tal's user avatar
  • 63
0 votes
2 answers
45 views

I am not being able to protect under Next Auth the dynamic paths [slug]. Nested paths like [slug]/nested-page are being protected and redirected to login page when the user is not logged as intended, ...
Ramate's user avatar
  • 21
0 votes
1 answer
106 views

Problem I'm trying to deploy a Next.js 15.3.2 application for the past 4 hours with NextAuth v5 (beta.27) to Vercel, but I'm encountering a build error during deployment: Failed to compile. src/app/...
Christian Yahir's user avatar
0 votes
0 answers
18 views

I'm building a Next.js application using next-auth with the AzureAD provider. My users sign in using their Microsoft accounts, and the authentication generally works well. However, I’ve run into a ...
Joppe Meijers's user avatar
0 votes
0 answers
31 views

I am working on a project with a few of my fellow students colleagues. The website runs locally exactly how it is supposed to. Env variables: ### NextAuth ### NEXTAUTH_URL="https://placeholder-...
Bluebull's user avatar
1 vote
1 answer
154 views

I want to let people sign in to my Next.js Typescript application using GitHub. I am storing the users in a PostgreSQL database table. Everything runs on Google Cloud Run. But in my app/lib/auth.ts ...
Europa's user avatar
  • 1,422
0 votes
2 answers
68 views

In my NextJS, I am using NextAuth. I have sign in/sign up with credentials and Google set up. The problem I am having is of redirect. I have made this middleware: export { default } from 'next-auth/...
AnAverageDev's user avatar
0 votes
0 answers
31 views

I'm using NextAuth.js for my application. When I try to create an account I get the 'something went wrong' error. Even though the User table has a verificationToken column, I get this message in the ...
Franceska Rouzard's user avatar
0 votes
0 answers
20 views

i have a problme when i try to login with google i can login, but when i try to login with credentialsProvider i got undefined in my seesion and i can't login to my page, though i have the user from ...
Farman ullah's user avatar
1 vote
1 answer
162 views

When I am trying to do next build to prepare my application for production, the next build script always stuck at collect page data, with the following error: TypeError: o is not a function #13 89.81 ...
goodwill's user avatar
  • 10.7k
0 votes
1 answer
74 views

When I run npm run build locally, I don't get any errors and the build completes successfully. However, when I try to deploy the project on Vercel, I get the following error: Error: NEXTAUTH_SECRET is ...
Hamza Tekin's user avatar
0 votes
0 answers
61 views

so I've read the documentation at https://next-auth.js.org/configuration/providers/oauth I have received a client secret and such from my corportate oAuth provider but for the life of me I can't ...
BostonAreaHuman's user avatar
1 vote
0 answers
42 views

I'm trying to implement a sign-in-with-apple feature for my Web-application. To do that im using next-auth as a 3rd party library. Now after setting up my apple client ID and Secret I want to test it ...
Bottle's user avatar
  • 63
0 votes
0 answers
32 views

I’ve been trying to fix this error for over a day now and can’t seem to figure it out. Whenever I try to log in with GitHub using NextAuth.js, I get this error in the terminal: Error: Unauthorized - ...
MegaMindTheCoder's user avatar
0 votes
0 answers
53 views

UntrustedHost: Host must be trusted. The URL was: This means your Amplify domain is not trusted by Auth.js, and the framework is rejecting any auth-related requests to/from it. This is a security ...
entwickler's user avatar
0 votes
1 answer
173 views

I have a NextJS application that is using AWS Cognito for the User Authentication system. We are using AuthJS@5 to integrate with AWS Cognito. After clicking sign-in, the user gets redirected to AWS ...
arvil's user avatar
  • 932
0 votes
0 answers
24 views

I have the following callbacks configured in my Next.js 15 project that uses next-auth 5. callbacks: { async authorized({ auth, request: { nextUrl } }) { const isLoggedIn = !!...
Diego Rascón's user avatar
1 vote
2 answers
246 views

I am trying to make the authentication flow for NextJS 15 with app routing. I managed to set up the login logic, saving the encrypted authentication session in a cookie and the logout flow. Now the ...
Razvan Anghel's user avatar
0 votes
0 answers
23 views

ALL implementations of the authorize function of NextAuth found on the web are false/deprecated with new Next.JS 15 and new NextAuth 5 (new auth.js) like this : async authorize(credentials: any) { ...
miltone's user avatar
  • 4,816

1
2 3 4 5
44