Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
c06ecda
chore: add GitHub policy files for stack upgrade (EMBED-590)
tuna1207 Nov 9, 2026
0b4c4e8
chore: migrate tooling to torus-scripts 9 and Vite+ (EMBED-590)
tuna1207 Nov 9, 2026
d4b2df9
ci: replace CI with validate, release-pr and security scanner (EMBED-…
tuna1207 Nov 9, 2026
64afd70
chore: update same-major dependencies (EMBED-590)
tuna1207 Nov 9, 2026
1946549
chore: drop unused @babel/runtime peer and add changeset (EMBED-590)
tuna1207 Nov 9, 2026
f611cd5
ci: update S3 sync step in validate workflow
tuna1207 Nov 9, 2026
b43c490
chore: upgrade @toruslabs/broadcast-channel to 14.0.0 and update depe…
tuna1207 Nov 10, 2026
b867fdf
chore: upgrade @toruslabs/fetch-node-details to 17.0.0 and update dep…
tuna1207 Nov 10, 2026
e581fa1
chore: upgrade @toruslabs dependencies and update package-lock.json
tuna1207 Nov 13, 2026
0cfb2cd
chore: upgrade @toruslabs dependencies and update service worker scripts
tuna1207 Nov 13, 2026
70678c2
chore: update @sentry/core peer dependency version
tuna1207 Nov 13, 2026
092ac00
fix: remove unnecessary nullish coalescing in userId retrieval
tuna1207 Nov 13, 2026
1ffebc8
fix: enhance error handling for sessionId retrieval in PasskeysHandler
tuna1207 Nov 13, 2026
8c9e3c0
fix: improve error handling in TelegramHandler for missing idToken
tuna1207 Nov 13, 2026
07151c4
fix: enhance error handling in TelegramHandler for missing state para…
tuna1207 Nov 13, 2026
a1e6190
fix: update handleLoginWindow return type to allow null responses
tuna1207 Nov 13, 2026
e37ca54
fix: update triggerLogin return type to allow null responses
tuna1207 Nov 13, 2026
8bacb12
fix: avoid remote property injection when parsing redirect params
tuna1207 Nov 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`.

Add a changeset with `npm run changeset` before opening a PR that should trigger a release.
12 changes: 12 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
"baseBranch": "master",
"access": "public",
"privatePackages": {
"version": false
},
"updateInternalDependencies": "patch",
"fixed": [],
"linked": [],
"ignore": []
}
7 changes: 7 additions & 0 deletions .changeset/embed-590-stack-upgrade.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@toruslabs/customauth": major
---

Stack upgrade to torus-scripts 9 / Vite+: Node >=24.22.0, npm >=12, Oxlint/Oxfmt, Changesets. Package `types` now point at `dist/lib.cjs/index.d.ts`. Dropped unused `@babel/runtime` peer. Toruslabs runtime majors: torus.js 18, broadcast-channel 14, fetch-node-details 17, session-manager 6, eccrypto 8, constants 17, http-helpers 10, metadata-helpers 9.

Breaking type changes: `triggerLogin` now returns `Promise<TorusLoginResponse | null>` (it always resolved to `null` in redirect mode; the type now says so). `ILoginHandler.handleLoginWindow` now returns `Promise<LoginWindowResponse | null>`. Callers must null-check the result before reading fields like `userInfo`.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
# Product code
src/ @torusresearch/Web3Auth-Product
test/ @torusresearch/Web3Auth-Product
examples/ @torusresearch/Web3Auth-Product

# Most restrictive — last match wins
.github/CODEOWNERS @torusresearch/Web3Auth-Admins
4 changes: 4 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Motivation and Context

<!-- Why is this change needed? What problem does it solve? -->

## Jira Link

<!-- Link to the Jira ticket (if applicable) -->
Expand Down
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2

updates:
- package-ecosystem: npm
directory: /
schedule:
interval: weekly
cooldown:
default-days: 3
open-pull-requests-limit: 10
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
cooldown:
default-days: 3
66 changes: 0 additions & 66 deletions .github/workflows/ci.yml

This file was deleted.

39 changes: 39 additions & 0 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Create release pull request

on:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: release-pr
cancel-in-progress: false

jobs:
release-pr:
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .nvmrc
- name: Install npm 12
run: npm install --global npm@12.2.0
- name: Install dependencies
run: npm ci
# The GitHub API commit mode signs the release commit, which `master` requires.
- name: Create or update the release pull request
uses: changesets/action@ae32849d5ba541f9ae29e40e22a623bc13562f51 # v2.1.2
with:
version-script: npm run version-packages
commit-message: "chore: release packages"
pr-title: "chore: release packages"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27 changes: 27 additions & 0 deletions .github/workflows/security-code-scanner.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Security code scanner

on:
pull_request:
push:
branches: [master]
schedule:
- cron: "17 4 * * 1"
workflow_dispatch:

permissions:
contents: read

jobs:
security-scan:
uses: MetaMask/action-security-code-scanner/.github/workflows/security-scan.yml@becb242930b3cc271c26da0280050db9c157e291 # v2.1.1
permissions:
actions: read
contents: read
security-events: write
with:
scanner-ref: becb242930b3cc271c26da0280050db9c157e291 # v2.1.1
paths-ignored: |
**/node_modules/**
**/dist/**
**/build/**
**/coverage/**
94 changes: 94 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Validate pull request

on:
pull_request:
push:
branches: [master]

permissions:
contents: read

jobs:
validate:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: ["24.22.0", "26"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ matrix.node }}
- name: Install npm 12
run: npm install --global npm@12.2.0
- name: Install dependencies
run: npm ci
- name: Check dependency hardening
run: npm exec --no -- harden check --package-manager npm
- name: Check source
run: npm run check
- name: Build packages
run: npm run build
- name: Check TypeScript projects
run: npm run typecheck
- name: Run tests
run: npm test
- name: Check release notes
if: |
github.event_name == 'pull_request' &&
!startsWith(github.head_ref, 'changeset-release/') &&
!startsWith(github.head_ref, 'dependabot/')
env:
BASE_REF: ${{ github.base_ref }}
run: |
git fetch --no-tags origin "${BASE_REF}:refs/remotes/origin/${BASE_REF}"
npm exec -- changeset status --since="origin/${BASE_REF}"
- name: Preview package archive
run: npm pack --dry-run --json

deploy-demo:
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
needs: validate
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version-file: .nvmrc
- name: Install npm 12
run: npm install --global npm@12.2.0
- name: Install dependencies
run: npm ci
- name: Build package
run: npm run build
- name: Start Wiz sensor
uses: wiz-sec-public/wiz-sensor-github-action@2fd38e4d101f185b1deb0c313c0adb0a7efdfe62 # v0.9.6
continue-on-error: true
with:
api-token: ${{ secrets.WIZ_SENSOR_TOKEN }}
- name: Pack and build example
run: |
npm pack
cd examples/vue-app
npm run install:local
npm run build
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@e1253824e5c10ff9df46874f81ed3ec929e19cfd # v6.3.0
with:
role-to-assume: ${{ vars.AWS_ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION_US }}
- name: sync s3
run: aws s3 sync ./examples/vue-app/dist s3://demo-customauth.web3auth.io --region us-east-1 --no-progress
- name: Update AWS Cloudfront Config
uses: chaitanyapotti/cloudfront-update-distribution@c5d4a6b318664766f944d11c32544f492fb3027d # v4
with:
cloudfront-distribution-id: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }}
cloudfront-invalidation-required: true
cloudfront-invalidation-path: "/*"
cloudfront-wait-for-service-update: false
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ bundle.min.js
types2/
.DS_Store

.npmrc
.vitest/
11 changes: 11 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Avoid installing packages published in last 3 days.
min-release-age=3

## Don't install packages from git urls.
allow-git=none

## Disable installing dependencies from remote URLs.
allow-remote=none

## Pin allowed scripts to exact versions of dependencies to prevent unexpected script execution.
allow-scripts-pin=true
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
>=24.x
26
30 changes: 7 additions & 23 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

#production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
types/
.github/CODEOWNERS
dist
node_modules
coverage
examples
*.tgz
.changeset
package-lock.json
5 changes: 0 additions & 5 deletions .prettierrc.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions eslint.config.mjs

This file was deleted.

Loading
Loading