Members‑only pages. One line of code.
Add sign-in to the site you already have. No new site, no new host, nothing to move.
See the codeHow it works
1Add one line of code
That's the install. No new site, no new host, nothing to move.
2Your visitor signs in
With Google, GitHub or a code we email them. There is no password to forget.
Soon, AI assistants sign in too
The agents your members use will sign in the same way, and open only what their person may.
Coming after launchWho it's for
Three example stories, to show the idea.
Meet Maya
Maya makes browser games. Her players want to be remembered: their scores, their saved levels, a welcome back in every game. She adds one line to each game, and her players sign in once.
Meet Dale
Dale runs a barbershop. His regulars want a page of their own: their usual chair, their next visit, a thank-you. Dale adds it to the site he already has, and nothing moves.
Meet Sam
Sam is an electrician. Customers sign in to Sam's own site to see their past jobs, their quotes and their warranty papers, all in one place, without a phone call.
The code
Three examples, from one line on a plain site to React.
One script tag
Add one script tag. That's the install. The sign-in button and the member's menu go wherever you place them.
<script src="https://js.memberpod.ai/v1.0.0/doorman.js"
integrity="sha384-…"
crossorigin="anonymous" defer></script>
<!-- then, wherever you want them: -->
<button data-doorman="sign-in">Sign in</button>
<div data-doorman="user-button"></div>A members-only page
The check happens before the page is sent, so a locked page is not simply hidden by the page itself.
"members": {
"app": "app_…",
"issuer": "https://auth.memberpod.ai",
"rules": [
{
"pattern": "/members/**",
"require": "signed-in"
},
{
"pattern": "/members/gold/**",
"require": { "plans": ["gold"] }
}
]
}React
The same sign-in in a React app: what signed-out and signed-in visitors see.
import {
DoormanProvider,
SignedIn,
SignedOut,
SignInButton,
UserButton,
} from "@doorman/react";
export default function App() {
return (
<DoormanProvider mount="/api/doorman">
<SignedOut>
<SignInButton />
</SignedOut>
<SignedIn>
<UserButton />
</SignedIn>
</DoormanProvider>
);
}