Skip to content

chore: remove dead API token references from GUI, docs, and config#498

Merged
wesbillman merged 2 commits into
mainfrom
api-token-cleanup
May 7, 2026
Merged

chore: remove dead API token references from GUI, docs, and config#498
wesbillman merged 2 commits into
mainfrom
api-token-cleanup

Conversation

@wesbillman
Copy link
Copy Markdown
Collaborator

Summary

PR #475 deleted the REST API and Bearer token auth, replacing it with pure Nostr (Schnorr signatures via NIP-42/NIP-98). PR #478 migrated desktop, mobile, and ACP clients. This PR removes the leftover client-side references, documentation, and config that pointed at the now-dead token system.

  • Desktop: delete features/tokens/ directory, token settings tab, token types/hooks/mutations, agent creation token UI, token E2E tests and mocks
  • Mobile: clean test fixtures (production media_upload.dart deferred to follow-up)
  • Docs: update 7 files (README, ARCHITECTURE, SECURITY, NOSTR, TESTING, VISION, CLI README) to reflect NIP-42/NIP-98 auth model
  • Config: remove SPROUT_API_TOKEN env vars, clean justfile token parameters, deduplicate SPROUT_REQUIRE_AUTH_TOKEN
  • CI: add dead-token-guard job to prevent reintroduction of token patterns in client code

What's NOT in this PR (follow-up)

Relay-side auth code is intentionally left for a separate PR:

  • crates/sprout-relay/ (require_auth_token config, X-Auth-Token media path)
  • crates/sprout-db/ (api_tokens table, ApiTokenRecord, CRUD functions)
  • schema/schema.sql (api_tokens table)
  • crates/sprout-acp/ (legacy env var propagation)
  • mobile/lib/shared/relay/media_upload.dart (production X-Auth-Token field)

Numbers

Metric Value
Files changed 32
Insertions +79
Deletions -1,865
Net -1,786

Test plan

  • pnpm typecheck — clean
  • pnpm build — clean
  • flutter analyze — clean
  • flutter test — all passing (including modified media_upload_test.dart)
  • cargo test (unit) — 183/183 passing
  • Orphan grep for deleted types — 0 matches
  • CI guardrail local run — clean
  • Pre-push hooks (11/11) — all green

🤖 Generated with Claude Code

wesbillman and others added 2 commits May 7, 2026 11:57
PR #475 deleted the REST API and Bearer token auth, replacing it with
pure Nostr (Schnorr signatures via NIP-42/NIP-98). This commit removes
the leftover client-side references, documentation, and config that
pointed at the now-dead token system.

Desktop: delete features/tokens/ directory, token settings tab, token
types/hooks/mutations, agent creation token UI, token E2E tests and
mocks. Mobile: clean test fixtures. Docs: update 7 files to reflect
NIP-42/NIP-98 auth model. Config: remove SPROUT_API_TOKEN env vars,
clean justfile token parameters. CI: add dead-token-guard job to
prevent reintroduction.

Relay-side auth code (api_tokens table, require_auth_token config,
X-Auth-Token media path) intentionally left for a follow-up PR.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Okta OIDC integration (PR #293) was never merged. Remove all
residual documentation, config, and dependencies:

- Remove OKTA_* env vars from .env.example and README
- Remove Nip42Okta, JWKS caching, and Okta JWT auth from ARCHITECTURE.md
- Remove unused jsonwebtoken crate from workspace Cargo.toml
- Delete dead scripts/setup-keycloak.sh
- Clean stale JWT/OIDC terminology from NOSTR.md, VISION.md,
  CONTRIBUTING.md, and config.rs comments

Schema (okta_user_id column) and docker-compose Keycloak service
deferred to relay auth follow-up PR.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wesbillman wesbillman force-pushed the api-token-cleanup branch from a7be394 to 5ee0555 Compare May 7, 2026 18:58
@wesbillman wesbillman enabled auto-merge (squash) May 7, 2026 19:06
@wesbillman wesbillman merged commit 0dcfa86 into main May 7, 2026
15 checks passed
@wesbillman wesbillman deleted the api-token-cleanup branch May 7, 2026 19:07
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.

1 participant