Creating a members only site with tiered access?

Is there a way to even do this with a static site? Obviously needs some kind of active interaction somewhere. I think I can use a hosting service like firebase to handle authentication…and a service like snipcart could handle payments? There are a lot of ecommerce solutions out there, and I thought this would be a simpler problem, but I am having trouble finding examples.

If you search around the forums there are ways to kinda sorta password protect things, but what you are asking is not “static”. At some point you need a dynamic interaction model, and while Hugo can provide the static content pages, it isn’t made for any other part of such a site.

Netlify and Firebase, these services have their own authentication backend, but that ain’t Hugo, so there are better places to ask your questions. :slight_smile:

1 Like

Completely untested but, I suppose you could kind of make it work using .htaccess and .htpasswd targeting a specific sub-folder of content, and you can even script those things. It’s not really flexible, but if you had just a folder or two of content to be protected, it might work. This is Apache authentication and has nothing to do with Hugo, except, you might use your Hugo deploy process to get the updated .htpasswd file up on to the server.


I would like to revitalize this thread because we are looking to do the same thing for implementing a new SaaS on Hugo. In addition, we would like to restrict content on the site based on their membership tier. For example, free and paid users would have access to the same web page / url but paid members will see more content than free members.

Wordpress has plugins to monetize CMS sites including logins, paid subscriptions and page content restrictions. Netlify’s Identity product appears to offer some of these features but not to the extent of paid tiered membership and content restriction. Has anyone else seen these kind of monetization implementations on Hugo or another static site generator?

I’m made a metered paywall on a Hugo website by using Piano’s Tinypass product. They took care of registering members, payment collection, and with a JavaScript callback whether the user viewing the page has rights to do so.

That way some of the pages were readable only by members, while others could read only the public pages.

From what I understand it’s possible to combine Netlify Identity with an external service. For membership management you could use Gumroad, SendOwl, and the likes. They both have APIs, so it might be possible to connect a Netlify Function with the membership API to see if a user logged in with Netlify Identity is registered. Perhaps that would work, depending on how much time and effort you want to throw at it? :slight_smile:

Thanks for mentioning Piano. Tinypass has a WordPress plugin but it hasn’t been maintained. I don’t see any pricing info on Piano’s website so I guess I will sign up for the demo.

@Jura, how did you integrate Tinypass - it is a javascript. Did you embed it into a page header template, or put in static/resources type directory and referred to it through the template? @hbcondo - how was your experience with tinypass implementation?
I have little experience with this so pointers would be much appreciated, thanks


I use basic auth for content preview and test sites, but it has its own quirks hens the expiration is solely handled by the browser.