Replies: 2 comments 2 replies
-
@PavelSrom Did you find the solution for test the nextAuth protected api routes using postman ?, if yes plz tell me how you done it ... |
Beta Was this translation helpful? Give feedback.
-
any update on this?? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I wonder if there's a way how to test a Next.js API route that is protected by next-auth's
getSession
in Postman? I'm using a JWT authentication and I know that by default next-auth uses cookies behind the scenes. I've tried to sync my cookies with Postman using the Postman interceptor tool, but it can't access the cookies used by next-auth for whatever reason, and therefore I cannot verify in Postman that my protected routes work properly.Is there a way to test the protected endpoints from Postman with cookies, or alternatively is there a way to make next-auth use authorization headers with the JWT included instead of cookies?
Here's my simple protected route that I want to test from Postman (
/api/hello
):and here's my my
[...nextauth]
file:Thanks a lot for your feedback!
Beta Was this translation helpful? Give feedback.
All reactions