I have a nextjs app that needs to make api requests based on the user's inputs. Now the api requests need a token that I would like to generate at the start of the app and anytime that i need to based on the user data from getServerSideProps or something. I looked at a lot of options like saving it in cookies and session but i don't think for my use case that serves the purpose plus i would also like to learn how it should be done in nextjs. Basically I need a
const data = {}
accessible from each request on the server so that when the server gets a request it does not have to refetch the data it already has.