Category "next-auth"

How to solve Vercel 500 Internal Server Error?

I have created a project that uses MongoDB to store user info and Next-Auth to authenticate users. On local host this is all working seamlessly. Previously I ha

NextAuth authentication not working on Deployment on Vercel (Working on localhost)

Used credentials for authentication with nextauth. My code is not working on vercel deployment but working on localhost. I used the basic cresdentials for authe

Next-auth sign In working locally but not on vercel. Error- CLIENT_FETCH_ERROR

I've used next-auth with google signIn in my next application. I've set the environment variables as well as the auth file under api as import GoogleProvider fr

TypeError: Cannot convert undefined or null to object in NextAuth

NextAuth.js automatically creates simple, unbranded authentication pages for handling Sign in, Sign out.So I created it like the document suggest.I created in s

Nextauth token keeps on nesting

I updated with v4 beta with next-auth. But the token keeps on nesting on refresh, as in token converts to token.token to token.token.token .... on each refresh

NextAuth Credentials, adding more to the user scheme

Nextauth with mysql persisting users. I'm trying out this NextAuth thing to see if this is something I like. So far so good. There is one thing tho which is bug

Why did user object is undefined in NextAuth session callback?

I use NextAuth for signIn with discord provider and I need to add userID into the session object. For that I use session callback but user object is undefined.

Next-auth CredentialProvider config and redirect

I'm a bit confused on the implementation of the credentials provider and the redirects. The documentation says that the credentials provider doesn't support a c

Next-Auth : How the registration is handled with a email + password credential provider?

How the registration is handled with a custom credential provider ( email + password)? Currently my [...nextauth].js looks like this: import NextAuth from 'next

Next Auth "Credentials" redirection when throwing error on custom login page

I have a custom login page, which in turn calls the signIn() function when submitting the form. I am only using the "Credentials" provider. Server-side, I am ju

Next-auth - How to update the session client side?

I manage to update my session serverside, with new user data, but event after assigning it to my session object in [...nextauth.js], my session client side rema

[next-auth][error][client_fetch_error] NextAuthJS CredentialsProvider "providers SyntaxError: Unexpected token < in JSON at position 0"

As a beginner in Next.js I came across NextAuthJS. I wanted to use custom email and password authentication and thus I went with Credentials Provider and config

Why do I get a 401 unauthorized error when logging in?

I am using the NextAuth.js credentials provider for the log in procedure. When logging in I am catching the errors in a try-catch block and set the error state

getSession next-auth returns null

I am learning NextAuth, and I am just trying to get my current session in an API. Looks pretty easy from the documentation, but it keeps giving me null. If I us

next auth coinbase provider using prisma adapter doesn't add Account error created_at in data.created_at for type AccountUncheckedCreateInput

Seems like one data object in AccountUncheckedCreateInput is missing: data.created_at Invalid p.account.create() invocation in 16 }, 17 updateUser: ({ id, ...da

Using Prisma with Yarn v3

I am building an app using Next.js, Next-Auth, and Prisma. I am using API Routes for backend code. Recently, I upgraded Yarn on my pc to v3.1.1. I then created