<script> tag and a <div>. That’s your entire security surface.
Your clientId is meant to be public
YourclientId is a public identifier — designed to be in your HTML source, exactly like Google’s OAuth client_id or Stripe’s pk_live_... publishable key. It tells our servers which app is embedding EPIS, nothing more.
clientSecret on your side. No private key. No signing.
Origin-restriction enforcement (rejecting a
clientId used from a domain you didn’t register) is on our roadmap but not yet live — today, clientId identifies your integration to us for support and analytics, not as a security boundary. Don’t rely on it to keep your integration private; there’s nothing sensitive to protect on your side either way (see below).We handle auth — completely
The “Authenticate with PastpaperLM” flow runs entirely on our infrastructure:1
User clicks Sign In
A popup opens on our domain — our servers, our Google OAuth credentials. Users sign in with the same PastpaperLM account they already use everywhere else.
2
Google auth runs
The entire OAuth exchange happens between the user, Google, and PastpaperLM. Your app is not in the loop.
3
Token lands in the iframe
The access token is posted to
embed.pastpaperlm.com via postMessage — stored in the iframe’s own localStorage, scoped to our origin. Your page can’t read it. It’s not yours to manage.4
EPIS loads
The user is authenticated. Popup closes. Chat appears. You didn’t write a single line of auth code.
Tokens live in the iframe — not your page
EpisBox useslocalStorage keyed to embed.pastpaperlm.com. That means:
- Tokens are isolated to the iframe’s origin by the browser’s same-origin policy
- Your JavaScript can’t access them — not accidentally, not intentionally
- Safari ITP, Firefox ETP, Chrome’s third-party cookie blocking — none of these affect
localStorage. Your users stay signed in across sessions on every browser
iframe isolation — your app and EPIS don’t bleed into each other
EPIS runs in a sandboxed<iframe> from embed.pastpaperlm.com. The browser enforces a hard boundary:
- Your CSS doesn’t affect the EPIS UI — theme it with our token system, not global stylesheets
- EPIS can’t read your page’s DOM, cookies, or
localStorage - A bug in EPIS can’t XSS your app. A bug in your app can’t reach EPIS internals
postMessage — and the SDK validates the origin of every message. Messages from unexpected origins are silently dropped.