For developers
Add private sign-in in minutes.
The @mwen/js-sdk gives your users a private, credential-based sign-in that respects their data — and yours.
Terminal
$npm install @mwen/js-sdk
Built the right way
Open protocol
Built on OID4VP and SD-JWT-VC — open IETF/W3C standards, not proprietary APIs.
No backend required
The wallet is the user's browser. No mwen server is involved in the credential exchange.
TypeScript-first
Full type safety throughout. Zod-validated protocol messages. No runtime surprises.
Framework-agnostic
React bindings included. Core SDK is plain TypeScript — works with Next.js, Remix, SvelteKit, or vanilla.
Integration
Four steps to private sign-in
01
Install the SDK
npm install @mwen/js-sdk02
Configure the provider
import { MwenProvider } from '@mwen/js-sdk/react';
export function App() {
return (
<MwenProvider>
{/* your app */}
</MwenProvider>
);
}03
Request credentials
import { useMwen } from '@mwen/js-sdk/react';
function SignInButton() {
const { authenticate, status } = useMwen();
return (
<button
onClick={() => authenticate({ age: true })}
disabled={status === 'pending'}
>
{status === 'pending' ? 'Verifying…' : 'Verify with mwen'}
</button>
);
}04
Verify server-side
import { verifyAccessTokenFromHeader } from '@mwen/js-sdk/server';
export async function GET(req: Request) {
const payload = await verifyAccessTokenFromHeader(
req.headers.get('Authorization') ?? ''
);
// payload.sub — the user's per-app DID
// payload.age_over_18 — true if disclosed
}Ready to integrate?
Full API reference, protocol spec, and examples in the docs.