You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm integrating NextAuth into my web app and facing an issue with protecting specific pages. I have followed the docs here: https://next-auth.js.org/configuration/nextjs#middleware. When I visit a "restricted" page, even when I have authentication, it redirects me back to the login page. I can't ever get into the "restricted" page.
I know the user is correctly logged in because pages that are not protected are accessing user data just fine.
I am only using Google OAuth, no email, no other providers.
Question 馃挰
I'm integrating NextAuth into my web app and facing an issue with protecting specific pages. I have followed the docs here: https://next-auth.js.org/configuration/nextjs#middleware. When I visit a "restricted" page, even when I have authentication, it redirects me back to the login page. I can't ever get into the "restricted" page.
I know the user is correctly logged in because pages that are not protected are accessing user data just fine.
I am only using Google OAuth, no email, no other providers.
How to reproduce 鈽曪笍
middleware.js at root like so:
Set a NEXTAUTH_SECRET in .env using openssl generated string.
Visit /student/account after logging in, you will see that you are bounced back to the login page.
Contributing 馃檶馃徑
No, I am afraid I cannot help regarding this
The text was updated successfully, but these errors were encountered: