Simple password-protection for React app on Heroku : <p>I have a simple React app, created with create-react-app, that I'd like to deploy to Heroku (or somewhere easy) and password-protect. The protection can be really simple—just a single password is fine.</p>

<p>I started looking into HTTP basic auth but didn't find an easy answer. The closest I found was in <a href="https://blog.snajdr.de/adding-password-protection-to-zero-configuration-webpack-react-app-1bd3fc976996" rel="noreferrer">this post</a>, but (a) I don't love the idea of having to eject my app, and (b) I couldn't get it working. I was hoping I could find a Heroku plugin, but no luck there either.</p>

<p>It wouldn't be too hard to write a component that wraps my app and requests a password before showing it. The problem is that it executes client-side. I want to store the correct password server-side (or a hash thereof), and have the app send password attempts up to the server.</p>

<p>Since create-react-app operates on top of Node, I'm hoping there's an easy way to tell it to execute and store certain things on the server, but maybe I'm wrong. Any suggestions?</p>
