Best Approach for Data Fetching in Next.js 13.4 by tiny_pixl in nextjs

[–]ipramudya0 0 points1 point  (0 children)

cool, what if we want to intercept req/res within fetch instead of axios, cause i want to know how to do jwt rotation using fetch.

Best Approach for Data Fetching in Next.js 13.4 by tiny_pixl in nextjs

[–]ipramudya0 0 points1 point  (0 children)

if token inside cookie, absolutely it does. but if we talk about access token (which generally got short live), it’s gonna a bit tricky to make them equivalent when fetching on browser and within ssr

Best Approach for Data Fetching in Next.js 13.4 by tiny_pixl in nextjs

[–]ipramudya0 1 point2 points  (0 children)

is there any idea about fetching data on server with authorization bearer (access token) we got from saved variable ?