struggling with authorization/gated content

Options
I've been pulling my hair out trying to work this out on my own... and I am just missing a piece I can't figure out (or get a straight answer on the interwebs).

I'm basically looking to replace memberstack's gating, and I think all I'm missing is a javascript snippet or a lightweight library to handle what I need. I was using memberstack, but to pay (and have user caps) just for the gate... as I'm not leveraging their payment processing or user management... it seems truly silly.

Details:
• I'm using magic link/passwordless login 
• I understand the authentication process, using jwt for API protection, etc.
• what I don't have is the method for my site to gate content based on whether the token was authenticated or not (is there a valid token? if so, do nothing. If not, redirect to login)


Can anybody point me in the right direction?  A script, a library, an open source project... not Auth0 🙂?

Thank you!

Comments

  • Ramón Saucedo
    Options
    So you want to have gating based on a subscription/group or for each item? say if you want to read an e-book (ig) and only the ones who purchased can see it?

    Or is it more like tiers for everyone, given a page, there are x numbers of pages (depending of tiers of payment)

    There's also outseta... which is like the swiss army knife, but it has relatively low cap of costumers ($0.01 per costumer, until 50K, 1% transaction fee) and it's aimed more towards SaaS