A Next.js + Express.js + NextAuth setup that results in a "no access token provided" error
-
git clone https://github.com/BorisTheTripper/nextauth-token-error.git
-
(Optionally) change the existing oauth credentials in
.env
with your own. If you do, make sure to configure your app as follows: -
pnpm install
-
pnpm run dev
-
Go to
localhost:3000
while watching the terminal logs. If you see anECONNREFUSED
error, just go toapps/server/src/main.ts
, edit the file slightly & save to trigger nodemon one more time. After this, refresh the broser page & you should see NextAuth logs in the server app. -
Click "sign in" button & watch what happens in the server logs and browser request tab as you attempt to sign in.