At the moment in my nextJS API Routes I use session based authentication which works nicely in direct combination with my components and in the browser. But I designed the API in a way that it should also be usable by other clients. Is it possible to reuse these APIs in a way where I use the token provided by getAccessToken(req, res); in the header to authenticate all requests?
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
getSession unable to authenticate user in NextJS server-side | 3 | 2595 | December 20, 2023 | |
Next.js using getSession or getAccessToken resulting in user authentication being lost | 0 | 57 | July 18, 2024 | |
Get new JWT in Next 13 | 2 | 800 | November 21, 2023 | |
Auth using express API protected endpoints and NextJS | 2 | 2036 | May 10, 2023 | |
No Active Session or not authenticated [NextJS + App Router] | 0 | 81 | July 25, 2024 |