Stephane Legay
CTO | OCEG
Membership site with gated content
OCEG was running a custom CMS for its membership platform, with SalesForce, Chargify, Learnworlds integrations to provide its members with resources, courses and certifications.
We used Sanity with great success to migrate all of our 1,500 resources. Some interesting features:
- A landing page builder with 15 block types, 100% defined in schema with zero custom code.
- A form builder with a variety of field types specified in Sanity schema.
- Gated content taxonomy with Roles mapped to Products in our CRM.
The site is rendered in 11ty and deployed to Netlify, extremely good performance, Lighthouse score = 90.
For security / gated content access, we added a bit of Netlify magic. Authentication through a Netlify function generates a signed JWT cookie (using SalesForce as user store) containing some user attributes (name, email, ID, roles). Each resource page contains its required roles in HTML comments. A Netlify edge function validates the cookie, looks for the required roles in the page contents using Regex, and validates the user's roles against the required ones. Exceptions get router to the proper flow (log in, sign up, purchase membership etc..).
This allows to have a fast, authenticated & secure site with 0 network access at the edge.
Forms generated with our custom form builder leverage Netlify Forms to store submissions.
Sanity data is kept in sync with Algolia using GROQ webhooks. Algolia provides search and content recommendation capabilities.
All mux videos are signed in Netlify Edge Functions using regex and JWT cookie validation.
CTO | OCEG