Authentication for static one page vanilla js website

Authentication for static one page vanilla js website

I have created a tool which runs entirely on client side. I want to have a pro version of the site, which only users who have paid will have access to. The typical flow I want is like this:

  1. User pays for the license via paypal/stripe
  2. I add the user with email and password manually
  3. I provide the same credentials to the paid member via email
  4. User logs in with the credentials

My site is single page application and I tried using Auth0, but I am lost searching for resources. None of them are actually gating my website completely. Any resources you guys would like to share for solving this usecase. Thanks !