next-auth Questions

5

Solved

I'm using NextAuth on a NextJs project and I'm getting the error "Type error: Property 'session' does not exist on type '{}'.". I'm adding the session property to my _app.tsx as suggested...
Creasy asked 9/9, 2022 at 22:33

2

Is it possible to do a social login in Pop-up in next-auth? Or only possible redirecting to provider auth page? I'm asking because I don't want to lose all application state after redirect to a pro...
Expertise asked 29/7, 2021 at 1:20

2

I am using Next Auth and have a standalone Node.js API running. I am using Next Auth using credentials and use axios to send the username and password to the API. On the API side, if the username a...
Tedmund asked 31/3, 2022 at 17:53

4

I am trying to add authentication to my Next.js project with Next-Auth. However, I am stuck on a 500 internal server error after submitting credentials (http://localhost:3000/api/auth/error?error=C...
Footprint asked 16/7, 2020 at 14:37

1

I am a newbie to Next.js and moving my front end from React to Next (v4). I've already developed a back end using Spring which connects to a MySQL database hosted on Azure. The API is fully tested ...
Pilau asked 6/9, 2022 at 6:49

2

Solved

I am learning NextJS and NextAuth and have implemented a Credentials sign in with my own login page and it is working where the session object contains my user model (at the moment contains everyth...
Billfold asked 23/4, 2021 at 17:53

3

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 just trying to throw an error...
Juniejunieta asked 10/3, 2021 at 3:57

1

This is code in api/auth/[...nextAuth].js import NextAuth from "next-auth"; import CredentialsProvider from "next-auth/providers/credentials"; import User from "@/models/us...
Hyperemia asked 21/4, 2022 at 14:57

1

Solved

I am having some difficulties passing my token to the session callback. My end goal is to send the logged-in users data to the client-side. Originally I was only sending back the users email, but n...
Teador asked 15/4, 2022 at 2:30

1

I followed this tutorial for setting up the https in local development machine: https://dev.to/nakib/using-https-on-next-js-local-development-server-bcd And here's the code that I used: const { cre...
Trover asked 4/10, 2021 at 7:55

3

I'm using the following code in one of my pages: export async function getServerSideProps(context) { const session = await getSession(context) return { props: { session } } } and the session i...
Ensoll asked 26/1, 2021 at 21:47

2

Solved

How to get access_token from next_auth to use it with googleapis, lets say i am creating a crud app that store the data in google drive, I am using nextjs and next-auth for OAuth implementation for...
Proteose asked 31/3, 2022 at 17:26

2

Solved

I'm using next-auth with firebase adapter. Everything is working fine in terms of saving users in database, but something is not working in terms of authentication. import NextAuth from "next-...
Detinue asked 28/3, 2022 at 22:4

1

Solved

This is how we are authorizing users in our website signIn('credentials', { phoneNumber: verifiedPhone, code: otp.data, type: 'phone', redirect: false, }).then((res) => { console.log(res) /...
Chilli asked 26/3, 2022 at 10:24

2

Solved

Context I'm using NextJS v12.0.7, React v17.0.2, NextAuth v4.1.0 and Typescript v4.3.5. I wanted to create a simple auth system, based on NextAuth documentation and being redirected to homepage aft...
Peoples asked 14/1, 2022 at 22:31

1

Solved

I'm trying to implement dynamic routing in a NextJS app. I need the token from next-auth to get the data from getReport and getReports (in /reports.js) via an axios request to an API, but I don't k...
Faena asked 6/3, 2022 at 1:15

0

I am getting this error. https://next-auth.js.org/errors#oauth_callback_error expected 200 OK, got: 400 Bad Request Please help me solve it. THis is my next auth config const authHandler: NextApiHa...
Dulce asked 23/2, 2022 at 18:13

1

Solved

I'm using Next.js with next auth v4 for authentication with credentials. What I want to do is add a global verification for my API calls in a middleware to test before API calls the session. If the...
Hals asked 18/1, 2022 at 11:12

3

Solved

I'm using nextjs and nextauth on nginx. I'm getting a build fail but I'm not sure how to fix this error. 2021-12-06T09:35:02.4779281Z https://nextjs.org/telemetry 2021-12-06T09:35:02.4779648Z 202...
Rockbottom asked 6/12, 2021 at 9:43

1

I have set my NEXTAUTH_URL in Vercel. My NextJS app works fine most of the time, but randomly when I navigate to a new page, I'll get a 500 server error when the next-auth useSession() hook is call...
Vankirk asked 1/8, 2021 at 2:36

1

Solved

I've setup my Nextjs (Next12) with NextAuth CredentialsProvider and use Prisma Adapter to persist user's session in the database. I followed this documentation here from NextAuth team themselves. B...
Necessaries asked 24/12, 2021 at 16:9

1

I am working on a nextjs project using Prisma and GitHub auth, after running npm run dev project fail to compile as shown in the image below; How do I resolve this issue? package.json below ...
Ridglea asked 21/12, 2021 at 19:28

3

Solved

I'm currently using next-auth for authorisation using the credentials provider, I have sessions working and the user can login etc. However, on the session I need to pass in some data using the cli...
Schweiker asked 25/11, 2021 at 21:55

2

I implemented this in next-auth following some tutorial online import NextAuth from "next-auth" import Providers from "next-auth/providers"; const https = require('https'); exp...
Edible asked 8/11, 2021 at 23:1

0

I am building a frontend with next.js right now, which authenticates with GitHub OAuth using next-auth. Next-auth handles all the authentication including the session and saves all that into a data...
Implement asked 9/11, 2021 at 17:33

© 2022 - 2024 — McMap. All rights reserved.