next-auth Questions

1

I am using in my NextJS application Next-Auth for authentication to call a separate BE that gives me an access and refresh token. What I am trying to do with that tokens is to store them as cookies...
Rigsby asked 29/11, 2023 at 15:31

3

Solved

I am controlling user authentification in my next app with next-auth library I am using the credentials provider. First I call the login endpoint which returns the user informations then I take the...
Panacea asked 2/1, 2023 at 15:28

10

When I try to use next auth to create a discord oauth client and I click sign in, I get this error: https://next-auth.js.org/errors#get_authorization_url_error client_id is required { message: 'cl...
Omnipotence asked 17/2, 2022 at 13:55

6

Solved

I have a nextjs application with next-auth to manage the authentication. Here my configuration .... export default NextAuth({ // Configure one or more authentication providers providers: [ Keycl...
Lascivious asked 14/4, 2022 at 13:37

7

I am attempting to build a NextJS application that implements NextAuth. I am encountering the following error in my [...nextauth].ts when configuring my callbacks: Type error: Property 'role' does ...
Wamsley asked 13/11, 2022 at 23:18

6

The Problem I'm using Next.js, Prisma, and NextAuth's Email Provider strategy to setup an authentication system. I want to use Next.js middleware to redirect a request if it doesn't contain a valid...
Amboceptor asked 2/9, 2022 at 22:58

6

Solved

Here is my authOptions code which is running perfectly on localhost. import NextAuth, { NextAuthOptions } from "next-auth"; import GoogleProvider from "next-auth/providers/google&quo...
Electric asked 11/12, 2023 at 5:35

6

Solved

The app fails on trying to sign in using next-auth in my Next.js app in production mode when using the following command in the terminal on my local machine: `yarn build && yarn start` The ...
Nikko asked 13/12, 2022 at 12:35

6

Solved

I tried to deploy my nextjs application to vercel. This project is built using Prisma and Nextauth. The deployement went well, however when I go the url of my project it shows this error: Applicati...
Litchfield asked 14/7, 2023 at 9:21

8

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 remains the old one. It doesn't refresh, ...
Absentee asked 18/12, 2021 at 17:11

11

I got stuck with this issue for so long. To find the root cause, I tested the Next-auth authentication by running next-auth example code. Everything runed just fine on local (http://localhost:3000)...
Kristakristal asked 19/3, 2023 at 16:24

11

DESCRIPTION: I'm facing while implementing custom login form in my nextjs site using next-auth. It keeps on redirecting to "https://localhost:3000/api/auth/signin?csrf=true" SERVER SIDE C...
Lavalava asked 4/4, 2022 at 7:3

4

According to the docs https://next-auth.js.org/configuration/options#secret , adding a NEXTAUTH_SECRET as an environment variable, you don't have to define this option. But in vercel production I s...
Ardennes asked 24/3, 2022 at 10:42

5

Currently i'm trying to create user authentication with NextAuth. I'm able to use it inside my webapp and there is no problem with it. But now, i'm trying to hit the sign in with postman. So i can ...
Veii asked 27/7, 2022 at 8:30

7

I'm integrating next-auth package to my fresh Next.js project. I have followed all of the Next.js and next-auth documentations but not able to find a solution. The issue I'm facing goes like this: ...
Amazing asked 26/6, 2021 at 11:58

10

Solved

middleware.ts export { default } from 'next-auth/middleware'; export const config = { matcher: ['/my/:path*'] }; https://next-auth.js.org/configuration/nextjs#middleware now im using like this, bu...
Mchail asked 25/10, 2022 at 8:42

11

As the title suggests - I have a nextjs application that works absolutely fine locally - However, now I've deployed it to a dev environment, something really weird is happening. I've deployed my ap...
Pena asked 14/2, 2022 at 9:38

8

Solved

api/[...nextauth].js export default NextAuth({ providers: [ Providers.Credentials({ name: 'Credentials', credentials: { email: { label: 'E-mail', type: 'text', placeholder: '[email protect...
Academe asked 3/10, 2021 at 12:7

6

Solved

I just implemented email/password authentication into my locally hosted NextJS app with NextAuth. When I created the middleware to protect routes, whenever I clicked the sign out button, I got the ...
Manage asked 31/12, 2022 at 16:39

6

I am adding the following code to my existing js file to validate the authentication and I am trying to follow the next-auth documentations but I am getting this error "[next-auth]: useSession...
Hess asked 24/5, 2022 at 5:5

7

I don't know how to use 'next-auth/middleware' and 'next-intl/middleware' together in the middleware. Next-auth gets exported as default and it's a must... on the other hand Next-intl creates a mid...
Lactic asked 21/6, 2023 at 4:35

1

Solved

How do I display Job Title and other user properties in my Next Auth app using Azure AD / Entra ID. I am using next-auth v5 and Next.js V14 so I have an app directory and no pages directory. This i...
Transarctic asked 14/6 at 15:0

4

I'm new to NextJS and Next-Auth. I'm trying to write a secure api route that is only available if a user is logged in. I sucessfully accessing the session on the client side using useSession() but ...
Rockel asked 16/2, 2023 at 17:20

6

Solved

I'm currently working on a Next.js 13.4 project and trying to set up NextAuth using the app/ router. However, I'm encountering a type error that I can't seem to resolve. Here's my route.ts file: im...
Terenceterencio asked 2/6, 2023 at 9:39

5

I need to access user session data in a Next-Auth/Nextjs 13.4 API Route. I have configured the JWT and Session callback; however, the user data I specified in the callback function does not transla...
Starlet asked 21/7, 2023 at 17:54

© 2022 - 2024 — McMap. All rights reserved.