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 | |
|---|---|---|---|---|
| How to access Next.js API endpoint with JWT | 2 | 3802 | December 21, 2022 | |
| Next.js Authentication Tutorial | 29 | 15740 | March 10, 2021 | |
| Calling a protected NextJS API route from another Protected NextJS API route | 3 | 642 | July 29, 2024 | |
| The API calls using nextjs-auth0 are always showing as unauthenticated | 4 | 1790 | April 8, 2024 | |
| getAccessToken() returns encrypted token | 5 | 6022 | November 25, 2021 |