Following the guide "Next.js Platforms Starter Kit" guide resulted in 404 not found error #368
Replies: 4 comments 1 reply
-
Was this issue resolved? |
Beta Was this translation helpful? Give feedback.
-
Same issue here. Cannot get session in middleware. |
Beta Was this translation helpful? Give feedback.
-
Same issue debugging myself now. |
Beta Was this translation helpful? Give feedback.
-
@thinkjrs @SeeNoMore if you pulled the .env vars with I think VERCEL=1 tells next-auth not to use NEXTAUTH_URL because it is configured in Vercel. Removing VERCEL=1 and the other unused vercel env vars worked for me. |
Beta Was this translation helpful? Give feedback.
-
Hey there,
Running into a bit of a wall with this one – it's a known issue, but I'm drawing blanks on support from Vercel or the community. Could really use a hand to sort it out.
Thanks!
#289
middleware.ts
I have
NEXTAUTH_URL=http://app.localhost:3000
andNEXT_PUBLIC_ROOT_DOMAIN=localhost:3000
in my.env
Github callback URL
http://localhost:3000/api/auth/callback/github
I can see the information returned from github after logging in, the thing is the session is missing, I can see in my prisma studio
userId, type, provider, providerAccountId, refresh_token, refresh_token_expires_in, access_token, expires_at, toke_type
BUTscope, id_token, session_state, oauth_token_secret, auth_token
are missingI also tested https://github.com/nextauthjs/next-auth-example with the same setup and it worked!
this is what I get when I change the callback URL it to
http://app.localhost:3000/api/auth/callback/github
I get
and when I go to
http://app.localhost:3000/api/auth/providers
I seeBeta Was this translation helpful? Give feedback.
All reactions