Skip to content

feat(anonymous): add Session Transfer Ticket support - #1266

Merged
yogeshchoudhary147 merged 1 commit into
mainfrom
feat/anonymous-v2.28
Oct 1, 2026
Merged

yogeshchoudhary147 merged 1 commit into
mainfrom
feat/anonymous-v2.28

Conversation

@yogeshchoudhary147

@yogeshchoudhary147 yogeshchoudhary147 commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Bumps @auth0/auth0-spa-js to ^2.28.0
    • loginWithRedirect() and loginWithPopup() now automatically mint a short-lived transfer ticket from the stored anonymous session and pass it to /authorize as anon_transfer_token
    • getTokenSilently() now surfaces AnonymousSessionError with code: session_expired instead of silently rotating when the anonymous session has expired
  • Adds mintTransferToken to the AnonymousSessionApiClient mock and initialContext stub
  • Adds tests for mintTransferToken and session_expired error surfacing
  • Adds missing "Linking to an authenticated user" TOC entry and section to EXAMPLES.md

Test plan

  • anonymous.mintTransferToken is accessible via useAuth0()
  • mintTransferToken() delegates to the underlying client
  • mintTransferToken() returns null when no session exists
  • AnonymousSessionError with code: session_expired is surfaced from getTokenSilently()
  • Full test suite passes — 194 tests, 100% coverage

@yogeshchoudhary147
yogeshchoudhary147 requested a review from a team as a code owner October 1, 2026 15:28
@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository: auth0/auth0-react/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 5211ff72-e003-409e-a1df-8271f2d186bd

📥 Commits

Reviewing files that changed from the base of the PR and between 66d0c34 and 268097c.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • EXAMPLES.md
  • __mocks__/@auth0/auth0-spa-js.tsx
  • __tests__/anonymous.test.tsx
  • package.json
  • src/auth0-context.tsx
 ____________________________________
< LLM (Looking for Leaks in Memory). >
 ------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Comment @coderabbitai help to get the list of available commands.

@yogeshchoudhary147 yogeshchoudhary147 changed the title feat(anonymous): support spa-js v2.28 session transfer ticket and session expiry surfacing feat(anonymous): add Session Transfer Ticket and surface session expiry Oct 1, 2026
@yogeshchoudhary147 yogeshchoudhary147 changed the title feat(anonymous): add Session Transfer Ticket and surface session expiry feat(anonymous): add Session Transfer Ticket support Oct 1, 2026
@yogeshchoudhary147
yogeshchoudhary147 merged commit bde43d4 into main Oct 1, 2026
18 of 19 checks passed
@yogeshchoudhary147
yogeshchoudhary147 deleted the feat/anonymous-v2.28 branch October 1, 2026 15:34
yogeshchoudhary147 added a commit that referenced this pull request Oct 1, 2026
**Added**
- feat(anonymous): add Session Transfer Ticket support
[\#1266](#1266)
([yogeshchoudhary147](https://github.com/yogeshchoudhary147))
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