How to properly protect/access api route on next-auth 5.0.0-beta.4? #9429
Unanswered
romanslonov
asked this question in
Help
Replies: 2 comments 5 replies
-
Are you using middleware? |
Beta Was this translation helpful? Give feedback.
4 replies
-
I have sold this probleme with this code:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone,
I am using this official example repo and faced an issue when trying to get data from protected api route using server side page.
page.ts
lists route
I always got req.auth as
null
and as a result response is{ message: "Not authenticated" }, { status: 401 }
Beta Was this translation helpful? Give feedback.
All reactions