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
1
Add one line of code
That's the install. No new site, no new host, nothing to move.
2
Your visitor signs in
With Google, GitHub or a code we email them. There is no password to forget.
Coming after launch
Soon, AI assistants sign in too
The agents your members use will sign in the same way, and open only what their person may.
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>
);
}