I’m implementing auth0 along with gatsbyjs and I can get everything working using the standard "account’ tutorial and all the examples on the same topic. Protecting pages that are defined and coded from the beginning is fine. But, I want to protect when the pages are rendered from pure markdown. So, I have a number of markdown files that render similar to blog posts. They use the layout.js and posttemplate.js classes to render and the createPages in gatsby-node.js is used to read in the markdown and generate the pages during the build.
Since these pages are generated during the build, there is no corresponding .js file in the page folder where I can add the login checks. How would I add auth0 to protect these dynamically created pages?