All Questions
233
questions
0
votes
0
answers
22
views
Why won't my next.js credentials login with email and password work while my google provider authentication does?
I am trying to make a login page with Next Auth V4, and I have followed some instructions online that seems to work well for the google provider which works, but my "credentials" email and ...
0
votes
1
answer
22
views
Error When Adding Middleware to Protect Dashboard Route in Next.js Project
I am using Turborepo to create a Paytm like wallet, I have two next-apps, user-app, merchant-app and webhook handler in express.
user-app
├── app
│ ├── dashboard
│ │ ├── dashboard.tsx
│ ├── ...
0
votes
0
answers
52
views
Error: NEXT_REDIRECT when trying to signin
I have this auth.config:
import type { NextAuthConfig } from "next-auth";
export const authConfig = {
callbacks: {
authorized({ auth, request: { nextUrl } }) {
console.log(...
0
votes
0
answers
19
views
NextAuth Session Status Stuck at "Loading" State
I'm experiencing an issue with NextAuth in my Next.js application. The session status gets stuck at the loading state, and the spinner appears indefinitely in the main navigation bar, but only on the ...
0
votes
0
answers
28
views
NextAuth 5.0 + Next 14 - Transmitting authentication data during API calls
How can I include authentication when making fetch calls? I'm not receiving session information in the API route.
page.tsx
export default async function page() {
const response = await fetch(`/api/...
0
votes
0
answers
12
views
MongoDB nextauth
Hi! I have two web apps that share this database. Both of them have authentification using nextauth. The problem i have is that when i connect on one application i get dissconected from the other ...
0
votes
0
answers
29
views
Issue with NextAuth.js: User object is not being returned in the session
I'm developing a web application using Next.js and NextAuth.js. I have set up authentication using the credentials provider (email and password) and JWT for sessions. Although the authentication seems ...
0
votes
0
answers
17
views
TypeError: Cannot destructure property 'nextauth' of 'req.query' as it is undefined, next auth with next js and session gives 500 error [duplicate]
I am trying to use next-auth for authentication and authorization in next.js "next": "^14.1.4", "next-auth": "4.21.1",
But I am getting this error: ...
0
votes
0
answers
19
views
Include custom data fields in useSession
I'm using Next-Auth 4 in NextJS 14 App Router.
I would like to display the entire user info on frontend such as: email, name.
However the useSession() hook only returns email.
Do you have any idea ...
3
votes
0
answers
457
views
how to automatically refresh a Clerk token in client components?
The Setup
My next.js site using the app router talks to my Django backend, which treats Clerk as the source of truth for users. It does this in part by creating a user when being passed a valid JWT ...
1
vote
0
answers
16
views
In next.js 13, How to use code in url param to exchange tokens with custom providers in next-auth?
So I have created a custom provider in next auth like this :
{
id: "oidc",
name: "OIDC",
type: "oauth",
authorization: {
url: "https://www.auth....
0
votes
0
answers
41
views
Logout error: TypeError: res.setHeader is not a function using Next.js
I've recently started diving into Next.js, but I've hit a roadblock while working on the logout functionality. Despite researching similar issues, I'm still unable to resolve the error I'm ...
0
votes
0
answers
96
views
Why am I getting OAuthAccountNotLinked error in Next Auth with Next.js 13?
Trying to resolve my login issue I did a lot of research and testing through these Q&As:
NextAuth - OAuthAccountNotLinked - Imported data from another website - Autolinking
OAuthAccountNotLinked ...
0
votes
0
answers
10
views
having trouble extending the user session class in next-auth 5.0.0-beta.15
im using next-auth 5.0.0-beta.15 for my authentication
i tried just returning the user through credentials, i tried making some changes to the auth.config.ts file but nothing worked
auth.ts
//imports ...
0
votes
0
answers
85
views
NextAuth: Access JWT session data TypeError: (0 , next_auth_react__WEBPACK_IMPORTED_MODULE_4__.useSession) is not a function
I am trying to access the data from the JWT token just set within my auth.config.ts, as mentionned in the NextAuth documentation, the callback will act as supposed
import type { NextAuthConfig } from '...