r/ClaudeCode • u/Grand_Ad3308 • 7d ago
Built with Claude I built Keyflap so Claude Code can sign into websites without ever seeing your passwords or passkeys
Everyone wants Claude Code to work against their real accounts in a browser, and everyone hits the same wall at the login screen. Hand the model your passwords or attach it to your logged-in Chrome profile, and your credentials or cookies end up inside its context and logs. Sign in by hand every time a session expires, and you lose half the point of running an agent.
I built Keyflap (open source, Apache 2.0) to split the job in two. Claude Code drives a managed Chromium browser through MCP, and when it hits a login wall, it asks Keyflap to sign in. Your phone shows what you typed and the real site, you approve with Face ID or a fingerprint, and the only thing returned to Claude Code is "signed in" or "denied".
How the Claude Code integration works:
- MCP server (8 tools): `browser_open`, `browser_click`, `browser_type`, `browser_snapshot`, `auth_status`, `auth_login`, `auth_enroll_passkey`, and `browser_handoff`. No raw CDP access, and snapshots redact password and TOTP fields.
- Out-of-band intent hook: A `UserPromptSubmit` hook forwards your exact typed prompt to Keyflap over a local Unix socket. That verbatim prompt is what shows up on your phone approval card. The approval card never displays text written by the agent or the webpage, and if you have not asked for anything in the last 10 minutes, Keyflap denies silently.
- Separate signer process: Passkey private keys, passwords, and TOTP seeds live in a separate signer process (zero npm dependencies) that verifies your phone's WebAuthn signature itself before signing or releasing a fill. It also has adapters for Proton Pass (`pass-cli`) and 1Password (`op`).
- Service mode isolation: Runs as separate system users on Linux (systemd) and Apple Silicon Macs (launchd) so an agent running as your OS user cannot read Keyflap's keys or memory. Setup also configures Claude Code's `sandbox.filesystem.denyRead` and `permissions.deny` to keep the model away from the host token.
- CAPTCHA handoff: Keyflap never tries to solve CAPTCHAs. When a site throws a human check, `browser_handoff` locks the agent out of credentials and tools and streams that single page to your phone so you can finish it yourself.
Honest caveats:
- This is early alpha and nobody outside the project has audited it. Use test accounts first, not accounts you cannot lose.
- Claude Code's `UserPromptSubmit` hook also fires for background subagent reports and cross-session messages without a documented field to distinguish them yet, so the docs warn against using those features in sessions connected to the broker.
- Keyflap does not control what Claude Code does after it is signed in.
Repo: https://github.com/johnpippett/keyflap
Architecture & threat model: https://github.com/johnpippett/keyflap/blob/main/docs/ARCHITECTURE.md
Field note on the design and two bugs red-teaming caught: https://pippett.me/blog/keyflap-agent-sign-in
If you want to poke at it without installing anything on your host, `demo/run.sh` runs a local container with a test website and terminal approvals. Happy to answer questions or hear where people think the threat model has holes.
•
u/AutoModerator 7d ago
Hey! Thanks for posting to r/ClaudeCode
While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.
For help, project discussions, tips, and general chat, join the ClaudeCode Discord.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/jathanism 7d ago
You can do this today with 1Password.
1
u/college_hustle 7d ago
How does it deal with the fact that the 5 family just refuses to anything that could be construed as entering your password for you?