I'm building an app where I need to authorize the users based on 'mode' queryParameter & apikey that comes from the consuming applications.
It will then send an api request to backend and confirm if the user has the authorization. Also want to ensure that apikey is not exposed to outside.
Just wondering how am I going to approach this in Next.js?
I was thinking to build a local api and fetch the backend response and then call the local api from the pages. Because this has to happen in the _app.js (centralized), where getServerSideProps is not permitted, I'm bit confused on my approch.
Really appreciate your feedback