This is a visual walkthrough of how Book GPT and Ask Jeannie sit behind Membership.io auth. Toggle the member state on the right to see what each state looks like. When Tony wires the real iframe, the only thing that changes is the JWT source - the UI and gating logic stays the same.
In production this comes from a Membership.io JWT in a signed cookie. Our edge function reads it, validates it, and sets the component props. No change to the app code.
Not logged in. The iframe would redirect to Membership.io login. No cookie is set, no API call is made, no cost to XI.
Not logged in. The iframe would redirect to Membership.io login. No cookie is set, no API call is made, no cost to XI.
Always accessible. Doubles as a lead magnet - email capture at download feeds ActiveCampaign.
Open →Always accessible. Doubles as a lead magnet - email capture at download feeds ActiveCampaign.
Open →Always accessible. Doubles as a lead magnet - email capture at download feeds ActiveCampaign.
Open →Membership.io embeds an iframe pointing at tools.experienceinvestigators.com/ask-jeannie. The iframe URL includes a signed JWT in the query string.
Our middleware reads the JWT, verifies signature against Membership.io's public key, extracts memberId + tier. Sets a signed session cookie scoped to tools.experienceinvestigators.com.
If tier is 'member' → proceed. If 'free' or absent → return 403 with a link back to Membership.io upgrade page. No Claude API call billed.
Identical queries in a 5-minute window are cached per-member to reduce cost. Answer streamed back through the iframe to the member.
Query count + tool name + latency logged via webhook to Membership.io, so XI sees engagement per member. No query content leaves XI's infra.
Matt owns the edge middleware + session cookie + gate rules. Tony owns JWT signing + iframe embed. 30-minute scoping call, 1-week implementation, 1-week dogfood before member-facing launch.