Skip to content

feat(auth): strengthen account security and add memory deletion - #585

Merged
chadbyte merged 5 commits into
mainfrom
feat/account-security-and-memory-deletion
Oct 12, 2026
Merged

chadbyte merged 5 commits into
mainfrom
feat/account-security-and-memory-deletion

Conversation

@chadbyte

Copy link
Copy Markdown
Owner

What changes

Account-enabled installations can use passwords/passphrases and passkeys, with a compatible transition from existing account PINs. Single-user and Server PIN access remain supported. Server administration controls and personal security settings are separated; signed-in devices can be reviewed and revoked within User Settings.

Sign-in now starts with an account chooser and remembers accounts on this browser after successful authentication. Remembered identities never grant access without authentication. The page uses Clay's loading-screen branding and direct sign-in headings.

Owners can delete saved Me knowledge from its detail view. Deleted entries leave active retrieval and future context; the append-only record retains history. Existing owner-only Project Log deletion remains available in log details.

Security and compatibility

  • Upgrade legacy PIN hashes compatibly and add password/passkey authentication.
  • Enforce server-side session expiry and revocation, durable attempt limits, and transport/origin checks.
  • Preserve existing authentication during migration; support startup when server configuration is absent.
  • Bind Me deletion to the authenticated owner, reject stale revisions, and prevent stale curation from restoring deleted entries.
  • No authenticator-app 2FA is included.

Validation

  • Full Node 22 suite: 3,386 passed, 2 skipped, 0 failed/cancelled.
  • Client import checks and git diff whitespace checks passed.
  • Coverage includes PIN migration, passwords/passkeys, session security, remembered accounts, owner isolation, stale deletion, atomic write failure, pending/error handling, and cross-tab list refresh.
  • No new interactive browser run was performed for Me deletion; its UI behavior is covered by VM fixtures. No real user records were deleted.

Use salted versioned scrypt hashes while verifying existing SHA-256
records and upgrading them only after successful login. Keep valid
logins working when migration persistence fails.

Use hash verification for PIN changes and preserve existing sessions,
temporary PIN flows and admin recovery. Document the rollback limit
for older binaries that cannot read migrated hashes.
Add opt-in account PIN-to-password enrollment and optional verified passkeys.
Preserve migrated PIN credentials and legacy single-user authentication,
while disabling redundant Server PIN controls and login in account mode.

Persist expiring hashed sessions, account/IP login limits and explicit HTTPS
proxy trust. Keep device management inside personal settings with accurate
activity metadata and row-local sign-out confirmation.

Validate with 86 targeted regression tests and shared-browser checks.
Remember successfully authenticated accounts with server-side browser
hints and an opaque cookie, without granting authentication authority.

Add progressive sign-in with Clay branding, responsive input cards,
password and PIN transitions, and existing passkey and email options.
Treat absent server configuration as empty when determining account policy.
Update the onboarding integration check for the new sign-in page heading.
Add owner-bound revision-checked deletion with an atomic tombstone and
linked report disposition. Keep deleted knowledge out of active retrieval
and prevent stale curation from restoring it.

Provide a Me deletion dialog with pending and error handling, refresh
other tabs, and preserve the existing Project Log deletion action.
@chadbyte
chadbyte merged commit fb6e10d into main Oct 12, 2026
2 of 3 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

This issue has been resolved in version 5.2.0-beta.1 (main).

To update, run:

npx clay-server@5.2.0-beta.1

-- Clay Deploy Bot

Build anything, with anyone, in one place.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant