Relative Content

Tag Archive for authenticationnext.jsnext-auth

Next 14 (App router) + Next-Auth 5 Secure Api Route

I been implementing next-auth (credentials) in a NextJS 14 project (using app router) but I’m facing a problem to secure an api route src/app/api/user/route.ts following the Next-Auth migration guide:

Next-Auth v5 store extra info about authenticated user

I am currently working with next-auth v5 and I am trying to store the accessToken along with user information in my auth.ts file. However, I am facing some difficulties in achieving this. I have tried various approaches but have not been successful so far.