Only index page is loading as expected, after adding AWS cognito #16812
Unanswered
damiangene
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a React, Next.js application that makes use of Ts. I've been deploying it using the serverless for Next.js framework which deploys it to an AWS lambda@edge and also makes use of CloudFront.
Recently I wanted to add authorization in the form of AWS Cognito. I followed this guide and it worked well and my multi-page site was now sitting behind a Cognito login.
I've now run into the problem where only my main index page loads fine. All other pages load differently as can be seen here via the Chrome developer tools sources tab.
vs another page.

Before adding the cognito authorization all my pages code in sources looked similar to the first screenshot.
I dont know what's caused this change, I'm relatively new to AWS as a whole and specifically Cognito. I'm also unsure of whether I potentially need to add something into the Next.js project itself. Any help or direction would be greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions