Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A simple way to use GitHub OAuth to serve a protected Jekyll site to your GitHub organization
Jekyll Auth is an open-source Ruby tool that gates a Jekyll site behind GitHub OAuth so only members of a specified GitHub organization can view it.
Jekyll Auth is an open-source Ruby gem and Sinatra application by Ben Balter that adds GitHub OAuth protection to a Jekyll static site. It takes a Jekyll project as input and outputs an access-controlled HTML site deployed on Heroku. The application uses the sinatra_auth_github middleware to authenticate users against GitHub and checks that they belong to the organization you configure. The project is end of life; the README recommends switching to GitHub Pages visibility controls instead.
sinatra_auth_github to handle the OAuth flow, so visitors log in with their existing GitHub accounts._site folder that Jekyll generates, using it the same way a Rails app uses the public directory.rake assets:precompile, which triggers a Jekyll build automatically.Every push to Heroku triggers the platform's built-in rake assets:precompile command, which builds the Jekyll site into the _site directory. Sinatra then serves that directory as static files. When a request arrives, the sinatra_auth_github plugin sends the visitor through GitHub OAuth; if their account is a member of the configured organization, the page is returned, otherwise they get a bouncer message.
No. The README declares the project end of life. The recommended path is to use GitHub Pages visibility controls if your GitHub plan supports private sites.
It uses GitHub OAuth through the sinatra_auth_github Ruby middleware. A visitor is redirected to GitHub to log in, then the app verifies they belong to the configured organization before serving the static Jekyll page.
You need a GitHub account, a GitHub organization, a registered GitHub application, and a Heroku account. The README notes you can use other hosts, but its instructions target Heroku specifically.
