stack/apps/e2e/tests
Mantra 7f8e3df852
feat: add anonRefreshToken to CLI auth flow and enhance session management (#1303)
- Extended `CliAuthAttempt` with `anonRefreshToken` and a migration.
- CLI `POST /auth/cli` accepts optional `anon_refresh_token` (must be an
anonymous user's refresh token for the current project).
- `POST /auth/cli/complete` supports `mode` `check` (anonymous vs none),
`claim-anon-session` (issue tokens for the linked anonymous session),
and `complete` (bind the browser session's refresh token to the
attempt). Completing clears `anonRefreshToken` on the row. We do **not**
merge anonymous account data into the signed-in user (that behavior was
removed as a security risk; the anonymous user remains unchanged).
- Template CLI confirmation page, stack-cli optional
`STACK_CLI_ANON_REFRESH_TOKEN`, SDK/spec updates, and e2e coverage.

<!--

Make sure you've read the CONTRIBUTING.md guidelines:
https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md

-->


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
* CLI login supports attaching anonymous sessions and a multi-mode
confirm/claim/check flow; CLI tools now surface login codes and remove
anon token after use.
  * Added interactive CLI auth demo page and a CLI simulator script.
* Client libraries: prompt flow accepts an optional anon token and a
promptLink(url, loginCode) callback.

* **Tests**
* Expanded end-to-end coverage for anonymous CLI sessions,
claim/complete/poll flows, upgrades, and error cases.

* **Documentation**
* Updated prompt CLI docs/spec to describe new options and callback
signature.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-14 02:09:35 +00:00
..
backend feat: add anonRefreshToken to CLI auth flow and enhance session management (#1303) 2026-04-14 02:09:35 +00:00
general Remove lint and typecheck tests 2026-04-09 13:28:45 -07:00
helpers Customizable ports (#962) 2025-10-20 15:24:47 -07:00
js Backend fallback (cloud run) (#1306) 2026-04-11 00:57:37 +00:00
global-setup.ts External db sync (#1036) 2026-02-05 12:04:31 -08:00
globals.d.ts Upgrade backend to Next.js 15 (#360) 2024-12-10 00:11:13 -08:00
helpers.ts [Fix] Flaky Neon, Email Delivery, and Other Tests (#1235) 2026-03-10 14:02:41 -07:00
setup.ts Email outbox backend (#1030) 2025-12-12 10:26:38 -08:00
snapshot-serializer.ts Sign up rules (#1138) 2026-02-03 11:08:24 -08:00