Skip to content

Upgrade CustomAuth to v22.3.3 - #85

Merged
sirpy merged 1 commit into
mainfrom
chore/customauth-v22
Nov 17, 2026
Merged

sirpy merged 1 commit into
mainfrom
chore/customauth-v22

Conversation

@sirpy

@sirpy sirpy commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Upgrade @toruslabs/customauth from 20.4.0 to the latest published v22 release, 22.3.3, and migrate the integration across its breaking API changes.

  • Replace separate aggregate-login APIs with unified triggerLogin and CustomAuthLoginParams.
  • Preserve Google's aggregate verifier/sub-verifier mapping using groupedAuthConnectionId and authConnectionId.
  • Migrate Facebook and Auth0 provider fields; retain Auth0's name identity field and the existing jwt session provider label.
  • Read unified redirect results while retaining finalKeyData.privKey, the existing callback, and service-worker-free redirect behavior.
  • Add the required @babel/runtime peer, update the lockfile, and document rollout requirements.
  • Add regression coverage, including the actual SDK's grouped Google key request and token hashing.

Validation

  • 14 targeted tests pass (src/login/torus.test.ts and src/login/adapters/privatekey.test.ts).
  • TypeScript (tsc --noEmit --incremental false).
  • Biome check on changed source files; commit/push hooks pass.
  • Production yarn build succeeds (local token-database initialization errors were logged during prerendering).
  • git diff --check.

Rollout notes

  • Node.js 22+ is required; CI already uses Node 24.
  • Existing Web3Auth environment-variable names and verifier values remain unchanged.
  • Restart any login initiated before deploying this upgrade because pending redirect storage changed.
  • Before production rollout, complete Google, Facebook, and Auth0 logins with existing test accounts and verify their wallet addresses are unchanged. Live OAuth/dashboard configuration and real key recovery were not exercised locally.
  • Unrelated existing dependency-audit advisories are outside this PR's scope.

Upstream releases: https://github.com/torusresearch/CustomAuth/releases

Migrate login providers and redirect handling to the unified v22 API while preserving existing verifier identities and wallet key selection. Add compatibility regressions and deployment notes.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The authentication SDK migration affects existing wallet-key recovery, but live Google, Facebook, and Auth0 logins and wallet-address continuity remain unverified and require human validation against production-equivalent provider settings.

No open issues 🎉

What changed in this PR

Upgrades CustomAuth from 20.4.0 to 22.3.3 and migrates the wallet login integration to its unified API while preserving existing provider identities, redirect behavior, and wallet-key selection.

Changes:

  • Unifies Google, Facebook, and Auth0 login configuration and hooks.
  • Updates dependencies and documents deployment requirements and live wallet-address checks.
  • Adds regression coverage for provider mappings, redirect results, error handling, and Google’s grouped key request.
File Description
yarn.lock Updates CustomAuth and its dependency tree.
src/​sections/​Login/​components/​LoginButton.tsx Switches Google to the unified login hook.
src/​login/​torus.ts Migrates login parameters and redirect results to v22.
src/​login/​torus.test.ts Adds integration regression tests and SDK compatibility checks.
src/​login/​hooks/​login.ts Consolidates provider login hooks around the unified API.
README.md Documents migration behavior and rollout checks.
package.json Upgrades CustomAuth and adds the Babel runtime peer.
config.ts Maps existing provider settings to v22 fields.

Review effort: Balanced

@sirpy
sirpy merged commit 7ba998d into main Nov 17, 2026
4 checks passed
@sirpy
sirpy deleted the chore/customauth-v22 branch November 17, 2026 13:14
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