chore(deps): bump otplib from 12.0.1 to 13.0.2 (#20855)

* chore(deps): bump otplib from 12.0.1 to 13.0.2

Bumps [otplib](https://github.com/yeojz/otplib/tree/HEAD/packages/otplib) from 12.0.1 to 13.0.2.
- [Release notes](https://github.com/yeojz/otplib/releases)
- [Commits](https://github.com/yeojz/otplib/commits/v13.0.2/packages/otplib)

---
updated-dependencies:
- dependency-name: otplib
  dependency-version: 13.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* fix: migrate to otplib v13

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tony <TonyRL@users.noreply.github.com>
This commit is contained in:
dependabot[bot] 2026-01-12 23:49:56 +08:00 committed by GitHub
parent f0ef4af7d3
commit 12eece429c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 58 additions and 46 deletions

View File

@ -2,7 +2,7 @@
import crypto from 'node:crypto';
import { authenticator } from 'otplib';
import { generate } from 'otplib';
import { RateLimiterMemory, RateLimiterQueue, RateLimiterRedis } from 'rate-limiter-flexible';
import { v5 as uuidv5 } from 'uuid';
@ -91,7 +91,7 @@ const flowTasks = {
});
},
async LoginTwoFactorAuthChallenge({ flowToken, authenticationSecret }) {
const token = authenticator.generate(authenticationSecret);
const token = await generate({ secret: authenticationSecret });
return await postTask(flowToken, 'LoginTwoFactorAuthChallenge', {
enter_text: {
suggestion_id: null,

View File

@ -1,4 +1,4 @@
import { authenticator } from 'otplib';
import { generate } from 'otplib';
import { RateLimiterMemory, RateLimiterQueue, RateLimiterRedis } from 'rate-limiter-flexible';
import { CookieJar } from 'tough-cookie';
@ -41,7 +41,7 @@ async function login({ username, password, authenticationSecret }) {
(await page.waitForSelector('button[data-testid="LoginForm_Login_Button"]'))?.click();
if (authenticationSecret) {
await page.waitForSelector('input[inputmode="numeric"]');
const token = authenticator.generate(authenticationSecret);
const token = await generate({ secret: authenticationSecret });
await page.type('input[inputmode="numeric"]', token);
(await page.waitForSelector('button[data-testid="ocfEnterTextNextButton"]'))?.click();
}

View File

@ -118,7 +118,7 @@
"notion-to-md": "3.1.9",
"oauth-1.0a": "2.2.6",
"ofetch": "1.5.1",
"otplib": "12.0.1",
"otplib": "13.0.2",
"p-map": "7.0.4",
"pac-proxy-agent": "7.2.0",
"proxy-chain": "2.7.0",

View File

@ -197,8 +197,8 @@ importers:
specifier: 1.5.1
version: 1.5.1
otplib:
specifier: 12.0.1
version: 12.0.1
specifier: 13.0.2
version: 13.0.2
p-map:
specifier: 7.0.4
version: 7.0.4
@ -1840,6 +1840,10 @@ packages:
resolution: {integrity: sha512-jCs9ldd7NwzpgXDIf6P3+NrHh9/sD6CQdxHyjQI+h/6rDNo88ypBxxz45UDuZHz9r3tNz7N/VInSVoVdtXEI4A==}
engines: {node: ^14.21.3 || >=16}
'@noble/hashes@2.0.1':
resolution: {integrity: sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw==}
engines: {node: '>= 20.19.0'}
'@nodelib/fs.scandir@2.1.5':
resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==}
engines: {node: '>= 8'}
@ -2122,23 +2126,23 @@ packages:
peerDependencies:
'@opentelemetry/api': ^1.1.0
'@otplib/core@12.0.1':
resolution: {integrity: sha512-4sGntwbA/AC+SbPhbsziRiD+jNDdIzsZ3JUyfZwjtKyc/wufl1pnSIaG4Uqx8ymPagujub0o92kgBnB89cuAMA==}
'@otplib/core@13.0.2':
resolution: {integrity: sha512-cew1CGyLSyO5whNRYWQIXIP0CmR+oA3M2N0uDjVg9Tv1qi19zIePXznVVhxHK/pJ27WjE0zzyQeqdc3zXsxj2Q==}
'@otplib/plugin-crypto@12.0.1':
resolution: {integrity: sha512-qPuhN3QrT7ZZLcLCyKOSNhuijUi9G5guMRVrxq63r9YNOxxQjPm59gVxLM+7xGnHnM6cimY57tuKsjK7y9LM1g==}
deprecated: Please upgrade to v13 of otplib. Refer to otplib docs for migration paths
'@otplib/hotp@13.0.2':
resolution: {integrity: sha512-NSqHein2S0awB2O5T2/qBz6CBJsRDcH7r10FZZr2BKQNE4aM+f9SCc0KmSGeJaTPzUch7eHOAvigFHV947gvLw==}
'@otplib/plugin-thirty-two@12.0.1':
resolution: {integrity: sha512-MtT+uqRso909UkbrrYpJ6XFjj9D+x2Py7KjTO9JDPhL0bJUYVu5kFP4TFZW4NFAywrAtFRxOVY261u0qwb93gA==}
deprecated: Please upgrade to v13 of otplib. Refer to otplib docs for migration paths
'@otplib/plugin-base32-scure@13.0.2':
resolution: {integrity: sha512-am41uRXlANMcIWIcpQFigNZEDx5yKfmCdihLPe2fsXXWTWMFtYMDN2Z+yakyyqs/k2OaLz/ThIj0ZnPwg7IpRQ==}
'@otplib/preset-default@12.0.1':
resolution: {integrity: sha512-xf1v9oOJRyXfluBhMdpOkr+bsE+Irt+0D5uHtvg6x1eosfmHCsCC6ej/m7FXiWqdo0+ZUI6xSKDhJwc8yfiOPQ==}
deprecated: Please upgrade to v13 of otplib. Refer to otplib docs for migration paths
'@otplib/plugin-crypto-noble@13.0.2':
resolution: {integrity: sha512-lb4Z/e4UPG7JPoLwvUqVCvZEWGIJq+SvZn5dba8xcQImzjVyU31+tpnsYbRVUOuh70TMYSJs2nB09wqglTXKSg==}
'@otplib/preset-v11@12.0.1':
resolution: {integrity: sha512-9hSetMI7ECqbFiKICrNa4w70deTUfArtwXykPUvSHWOdzOlfa9ajglu7mNCntlvxycTiOAXkQGwjQCzzDEMRMg==}
'@otplib/totp@13.0.2':
resolution: {integrity: sha512-Xv9wI4PXGt/bSh/Xj02TguqhMuR2zwnsgIwFNGNHvhdm02l9KKdmoknKKxGJTX20wpERRyP6bap1a+HzX0kxLQ==}
'@otplib/uri@13.0.2':
resolution: {integrity: sha512-wBy1Sc88noOXnuk04Ed9yaMvNL/qPDjFAt0RQG527NSERC9ZUx+51wyi8pmhmRIj4LKIHboq9TZutxJv99yjnA==}
'@oxc-project/types@0.107.0':
resolution: {integrity: sha512-QFDRbYfV2LVx8tyqtyiah3jQPUj1mK2+RYwxyFWyGoys6XJnwTdlzO6rdNNHOPorHAu5Uo34oWRKcvNpbJarmQ==}
@ -2469,6 +2473,9 @@ packages:
resolution: {integrity: sha512-yvTXYdSQPq8qmJ1zZPBRRB3RkkE2c0J3gIIMirX997yyVixrhtb0jmfM+9EZ2ZWXGx2JGLquGP10zY0nmnu75w==}
engines: {node: '>=20'}
'@scure/base@2.0.0':
resolution: {integrity: sha512-3E1kpuZginKkek01ovG8krQ0Z44E3DHPjc5S2rjJw9lZn3KSQOs8S7wqikF/AH7iRanHypj85uGyxk0XAyC37w==}
'@sec-ant/readable-stream@0.4.1':
resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==}
@ -5164,8 +5171,8 @@ packages:
resolution: {integrity: sha512-bOj3L1ypm++N+n7CEbbe473A414AB7z+amKYshRb//iuL3MpdDCLhPnw6aVTdKB9g5ZRVHIEp8eUln6L2NUStg==}
engines: {node: '>=0.4.0'}
otplib@12.0.1:
resolution: {integrity: sha512-xDGvUOQjop7RDgxTQ+o4pOol0/3xSZzawTiPKRrHnQWAy0WjhNs/5HdIDJCrqC4MBynmjXgULc6YfioaxZeFgg==}
otplib@13.0.2:
resolution: {integrity: sha512-EJVVB2lm2VhgGFlx6hsd2h8cRreVHBr/JZGlJ1ttDZWtghysAFGJRndKurng9jTwCJ6hkLLi1lf88NnC9jVJPw==}
outvariant@1.4.3:
resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==}
@ -5894,10 +5901,6 @@ packages:
text-table@0.2.0:
resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==}
thirty-two@1.0.2:
resolution: {integrity: sha512-OEI0IWCe+Dw46019YLl6V10Us5bi574EvlJEOcAkB29IzQ/mYD1A6RyNHLjZPiHCmuodxvgF6U+vZO1L15lxVA==}
engines: {node: '>=0.2.6'}
thread-stream@3.1.0:
resolution: {integrity: sha512-OqyPZ9u96VohAyMfJykzmivOrY2wfMSf3C5TtFJVgN+Hm6aj+voFhlK+kZEIv2FBh1X6Xp3DlnCOfEQ3B2J86A==}
@ -8006,6 +8009,8 @@ snapshots:
'@noble/hashes@1.8.0': {}
'@noble/hashes@2.0.1': {}
'@nodelib/fs.scandir@2.1.5':
dependencies:
'@nodelib/fs.stat': 2.0.5
@ -8329,28 +8334,32 @@ snapshots:
'@opentelemetry/api': 1.9.0
'@opentelemetry/core': 2.2.0(@opentelemetry/api@1.9.0)
'@otplib/core@12.0.1': {}
'@otplib/core@13.0.2': {}
'@otplib/plugin-crypto@12.0.1':
'@otplib/hotp@13.0.2':
dependencies:
'@otplib/core': 12.0.1
'@otplib/core': 13.0.2
'@otplib/uri': 13.0.2
'@otplib/plugin-thirty-two@12.0.1':
'@otplib/plugin-base32-scure@13.0.2':
dependencies:
'@otplib/core': 12.0.1
thirty-two: 1.0.2
'@otplib/core': 13.0.2
'@scure/base': 2.0.0
'@otplib/preset-default@12.0.1':
'@otplib/plugin-crypto-noble@13.0.2':
dependencies:
'@otplib/core': 12.0.1
'@otplib/plugin-crypto': 12.0.1
'@otplib/plugin-thirty-two': 12.0.1
'@noble/hashes': 2.0.1
'@otplib/core': 13.0.2
'@otplib/preset-v11@12.0.1':
'@otplib/totp@13.0.2':
dependencies:
'@otplib/core': 12.0.1
'@otplib/plugin-crypto': 12.0.1
'@otplib/plugin-thirty-two': 12.0.1
'@otplib/core': 13.0.2
'@otplib/hotp': 13.0.2
'@otplib/uri': 13.0.2
'@otplib/uri@13.0.2':
dependencies:
'@otplib/core': 13.0.2
'@oxc-project/types@0.107.0': {}
@ -8647,6 +8656,8 @@ snapshots:
type-fest: 5.0.0
zod: 4.3.5
'@scure/base@2.0.0': {}
'@sec-ant/readable-stream@0.4.1': {}
'@selderee/plugin-htmlparser2@0.11.0':
@ -11683,11 +11694,14 @@ snapshots:
options@0.0.6: {}
otplib@12.0.1:
otplib@13.0.2:
dependencies:
'@otplib/core': 12.0.1
'@otplib/preset-default': 12.0.1
'@otplib/preset-v11': 12.0.1
'@otplib/core': 13.0.2
'@otplib/hotp': 13.0.2
'@otplib/plugin-base32-scure': 13.0.2
'@otplib/plugin-crypto-noble': 13.0.2
'@otplib/totp': 13.0.2
'@otplib/uri': 13.0.2
outvariant@1.4.3: {}
@ -12572,8 +12586,6 @@ snapshots:
text-table@0.2.0: {}
thirty-two@1.0.2: {}
thread-stream@3.1.0:
dependencies:
real-require: 0.2.0