Auth, Identity, & OAuth

I have a contentful + gatsby + netlify site and I want some of the routes displayed on that site to be behind authentication. Part of my confusion is that none of my routes are static. They are built up dynamically at runtime by gatsby from the content in contentful. There is currently no src/router in my package. Would I leverage this: https://github.com/netlify/create-react-app-lambda/tree/reachRouterAndGoTrueDemo

even though I want none of my routes exist until the build is complete? Could I do this and still leverage SSO? Do I need to turn on identity even if I have using SSO?

Thanks

Hi @anne-kinetic, that demo that you linked to requires that you have Netlify Identity enabled, even if you use one of the SSO buttons on the Netlify Identity Widget.

That demo requires the use of react-router and this component: https://github.com/netlify/create-react-app-lambda/blob/reachRouterAndGoTrueDemo/src/App.js#L9-L20. I’m not sure how you would implement these in Gatsby. Perhaps someone else might chime in.