I recently came across this blog post by auth0. I am currently following this, but this like 2 steps of call, first call to the next.js server, then call to the external api server. It can also be done via client side libraries like tanstack-query. Are there any differences between the two aproaches apart from hiding api call details?
I implemented the server action approach, but this resulted in slightly longer response times in comparison to the tanstack-query one. But it is much more less boilerplate and easier to read.
Note: also found this SO question but did not find much