Skip to content

feat: sign in with Supermemory OAuth - #69

Merged
ishaanxgupta merged 1 commit into
mainfrom
capy/sign-in-with-supermemory
Nov 13, 2026
Merged

ishaanxgupta merged 1 commit into
mainfrom
capy/sign-in-with-supermemory

Conversation

@MaheshtheDev

Copy link
Copy Markdown
Member

Adds Supermemory OAuth sign-in to the OpenClaw plugin, matching the codex/opencode plugins. openclaw supermemory login (or npx -y @supermemory/openclaw-supermemory login) runs authorization code + PKCE on a 127.0.0.1:19883 loopback callback, stores tokens in ~/.supermemory-openclaw/credentials.json (0600), and enables the plugin in ~/.openclaw/openclaw.json. API keys are untouched: a configured apiKey or SUPERMEMORY_OPENCLAW_API_KEY still wins, and OAuth is only used when no key is set.

  • login --print-url prints one SUPERMEMORY_AUTHORIZE_URL=<url> line on stdout for supermemory plugin login, keeps the listener open, and exits 0 after the exchange (or immediately when already signed in). Headless runs also print the plain link, an ssh -L hint, and accept a pasted redirect URL.
  • Tokens refresh before expiry and once after a 401 (both SDK clients go through an authenticated fetch); a rejected refresh token clears them and asks to sign in again. logout revokes the refresh token and deletes the file; status shows OAuth vs API key and the account.
  • New bin (dist/cli.js), openclaw peer marked optional so npx doesn't pull a 600 MB install, README leads with OAuth, version 2.2.0.

Validation: typecheck, Biome CI and build pass. Against production, login --print-url (bundled bin, packed tarball via npx, and the real openclaw supermemory login on OpenClaw 2026.10.9) registers a client, prints the URL with a loopback redirect, and keeps the listener up; an API-key config still initializes and searches. Code exchange, 401/expiry refresh, rejected refresh, logout revoke, and key precedence were exercised against a local mock authorization server. The consent click itself still needs a human.

Open in Capy

Add login/logout/status with PKCE loopback flow, --print-url for the Supermemory CLI, automatic token refresh, and a standalone npx bin. API keys keep precedence.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@ishaanxgupta
ishaanxgupta marked this pull request as ready for review November 13, 2026 16:02
@ishaanxgupta
ishaanxgupta merged commit 813a8ee into main Nov 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants