Skip to content

Improved anonymous users#857

Merged
N2D4 merged 11 commits into
devfrom
better-anon
Aug 24, 2025
Merged

Improved anonymous users#857
N2D4 merged 11 commits into
devfrom
better-anon

Conversation

@N2D4
Copy link
Copy Markdown
Contributor

@N2D4 N2D4 commented Aug 21, 2025


Important

This PR adds support for anonymous users with JWT handling, updates OAuth flows, and includes new tests and documentation updates.

  • Anonymous User Support:
    • Added anonymous user sign-up in route.ts and verification-code-handler.tsx.
    • JWTs for anonymous users have role: 'anon' and use different signing keys in jwt.tsx.
    • X-Stack-Allow-Anonymous-User header controls anonymous access in middleware.tsx.
  • OAuth and JWT Handling:
    • Updated OAuth flows to support anonymous users in route.tsx and tokens.tsx.
    • JWKS endpoint can include anonymous keys in jwks.json/route.ts.
  • User and Team Management:
    • createOrUpgradeAnonymousUser function in users.tsx for upgrading anonymous users.
    • Personal team creation logic updated in crud.tsx.
  • Testing and Documentation:
    • New E2E tests for anonymous users in anonymous-comprehensive.test.ts and anonymous-upgrade.test.ts.
    • Documentation updates in CLAUDE-KNOWLEDGE.md and CLAUDE.md.
  • Type and Interface Updates:
    • Added includeAnonymous option in server-interface.ts and teams/index.ts.
    • Deprecated anonymous-if-exists option in common.ts.

This description was created by Ellipsis for 18cfae5. You can customize this summary. It will automatically update as commits are pushed.


Summary by CodeRabbit

  • New Features

    • Opt-in anonymous accounts: anonymous sign-up now returns tokens, can be upgraded to regular accounts; dashboard shows anonymous badge and toggle; demo "Anonymous Test" page.
  • Improvements

    • Session-aware OAuth/link flows; per-project multi-key JWKS with optional anonymous keys and public JWKS endpoint; CORS/header to allow anonymous access; listing/search can include anonymous users.
  • Documentation

    • Expanded knowledge/testing guidance and updated user-list docs.
  • Tests / Chores

    • New E2E anonymous test suites; added cmux script.

Loading
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