Exactly.  That&#x27;s the risk to mitigate.  Here&#x27;s scrypt for js using emscripten on actual scrypt C source... the site has to provide and adjust&#x2F;migrate the three factors over time to ensure a sane amount of cpu&#x2F;memory is used: <a href="https:&#x2F;&#x2F;github.com&#x2F;tonyg&#x2F;js-scrypt" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;tonyg&#x2F;js-scrypt</a><p>For real-world, practicality&#x27;s sake, the client-side of an app would contain the PBKDF or some AA code, as opposed to the traditional, slightly-riskier &quot;let the server handle all of it&quot;-approach... the server still has final say on authentication and authorization, just move some of it into client-side js.  There&#x27;s really not much impact on FE development considering most FEs and BEs are codeveloped these days anyhow.<p>Btw, for web devs Two-factor auth is cheap and easy to do, Google Authenticator OTP has open source libs and requires no calls to Google to work.