title: How do I protect a commercial app built with Electron?
body: <p>I'd like to know how to protect a commercial app built with <a href="http://electron.atom.io/" rel="noreferrer">Electron</a>. </p>
  
  <p>I'm not talking about the source code. At least for my specific scenario, I believe the minified bundle generated by Webpack is secure enough (except for the security part). I'm talking about preventing non-paying users to actually access the application.</p>
  
  <p><strong>Here's what I thought of:</strong></p>
  
  <p>In the website, the user can generate an activation code. The activation code is simply the Base64 of the user's e-mail address plus a digital signature. The app contains the signature public key so it can verify the activation code. This seems secure enough for me except that someone can hack the bundle to start returning true every time. I can't think of a way to bypass this.</p>
  
  <p><strong>So, is there a better way to protect a commercial app built with Electron?</strong></p>
  
  <p>If I don't find a better way, I'm probably going with what I described and live with the risk.</p>