-1

I have a project which includes to fetch data on multiple pages but all of the api's are secured except the first api which will fetch the data for the home page that is unsecured. Rest all the API's are secured via Azure AD.

I have moved from react js to next js for loading and speed but it seems like I have to call all the secured api's on client side after authentication when i receive the token. which gives me no extra benifit of using NEXT JS

I was expecting somehow to prerender all the pages for instant load

keshav
  • 1

1 Answers1

0

You can call them after authentication (granted you are using cookies) using getServerSideProps.

"I was expecting somehow to prerender all the pages for instant load", if the data is secured, and you only want authenticated users to view the data, then you can't, rather shouldn't, preload the data.

rguarascia.ts
  • 694
  • 7
  • 19