LaunchFa.st comes with baked-in paid and protected page(s) to help you prevent un-paid and un-authenticated users access such pages. With the payment methods such as Stripe and Lemon Squeezy integrated in LaunchFa.st and authentication methods such as Google, Twitter and Credentials, such payment callbacks’ and user authentication methods can be used by your system to grant access only to the paid and authenticated users to paid and protected pages in your application.
Here’s how easily you can create paid and protected pages with LaunchFa.st:
- Create a file, say
paid_and_protected.astro
with the following code:
- That’s it! The Upstash Redis instance integrated in the LaunchFast Starter Kit takes care of fetching the user paid status and the
getSession
function takes care of decoding the user authentication status. If unauthorized or not paid, a 403 response is sent enforcing pay and authentication based access to the content.
Worry not, with LaunchFa.st you get such a page paid_and_protected.astro
built for you with goodies on top.