A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
web: upgrade otplib
Abdullah Atta8cf6e65ed8c0
diff --git a/apps/web/__e2e__/models/auth.model.ts b/apps/web/__e2e__/models/auth.model.tsindex 9ee305ad3..dec3c800c 100644--- a/apps/web/__e2e__/models/auth.model.ts+++ b/apps/web/__e2e__/models/auth.model.ts@@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import { Locator, Page } from "@playwright/test";import { getTestId } from "../utils";-import { authenticator } from "otplib";+import { generateSync } from "otplib";type User = {email: string;@@ -62,7 +62,7 @@ export class AuthModel {}if (user.totpSecret) {- const token = authenticator.generate(user.totpSecret);+ const token = generateSync({ secret: user.totpSecret });await this.codeInput.fill(token);await this.submitButton.click();diff --git a/apps/web/package-lock.json b/apps/web/package-lock.jsonindex d41b133ae..fcc240096 100644--- a/apps/web/package-lock.json+++ b/apps/web/package-lock.json@@ -115,7 +115,7 @@"happy-dom": "16.0.1","ip": "^2.0.1","lorem-ipsum": "^2.0.4",- "otplib": "^12.0.1",+ "otplib": "^13.3.0","rollup-plugin-visualizer": "^5.13.1","vite": "5.4.11","vite-plugin-env-compatible": "^2.0.1",@@ -2875,6 +2875,19 @@"moo": "^0.5.1"}},+ "node_modules/@noble/hashes": {+ "version": "2.0.1",+ "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-2.0.1.tgz",+ "integrity": "sha512-XlOlEbQcE9fmuXxrVTXCTlG2nlRXa9Rj3rr5Ue/+tX+nmkgbX720YHh0VR3hBF9xDvwnb8D2shVGOwNx+ulArw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 20.19.0"+ },+ "funding": {+ "url": "https://paulmillr.com/funding/"+ }+ },"node_modules/@notesnook-importer/core": {"version": "2.2.5","resolved": "https://registry.npmjs.org/@notesnook-importer/core/-/core-2.2.5.tgz",@@ -2996,55 +3009,65 @@"link": true},"node_modules/@otplib/core": {- "version": "12.0.1",- "resolved": "https://registry.npmjs.org/@otplib/core/-/core-12.0.1.tgz",- "integrity": "sha512-4sGntwbA/AC+SbPhbsziRiD+jNDdIzsZ3JUyfZwjtKyc/wufl1pnSIaG4Uqx8ymPagujub0o92kgBnB89cuAMA==",+ "version": "13.3.0",+ "resolved": "https://registry.npmjs.org/@otplib/core/-/core-13.3.0.tgz",+ "integrity": "sha512-pnQDOuCmFVeF/XnboJq9TOJgLoo2idNPJKMymOF8vGqJJ+ReKRYM9bUGjNPRWC0tHjMwu1TXbnzyBp494JgRag==","dev": true,"license": "MIT"},- "node_modules/@otplib/plugin-crypto": {- "version": "12.0.1",- "resolved": "https://registry.npmjs.org/@otplib/plugin-crypto/-/plugin-crypto-12.0.1.tgz",- "integrity": "sha512-qPuhN3QrT7ZZLcLCyKOSNhuijUi9G5guMRVrxq63r9YNOxxQjPm59gVxLM+7xGnHnM6cimY57tuKsjK7y9LM1g==",+ "node_modules/@otplib/hotp": {+ "version": "13.3.0",+ "resolved": "https://registry.npmjs.org/@otplib/hotp/-/hotp-13.3.0.tgz",+ "integrity": "sha512-XJMZGz2bg4QJwK7ulvl1GUI2VMn/flaIk/E/BTKAejHsX2kUtPF1bRhlZ2+elq8uU5Fs9Z9FHcQK2CPZNQbbUQ==","dev": true,"license": "MIT","dependencies": {- "@otplib/core": "^12.0.1"+ "@otplib/core": "13.3.0",+ "@otplib/uri": "13.3.0"}},- "node_modules/@otplib/plugin-thirty-two": {- "version": "12.0.1",- "resolved": "https://registry.npmjs.org/@otplib/plugin-thirty-two/-/plugin-thirty-two-12.0.1.tgz",- "integrity": "sha512-MtT+uqRso909UkbrrYpJ6XFjj9D+x2Py7KjTO9JDPhL0bJUYVu5kFP4TFZW4NFAywrAtFRxOVY261u0qwb93gA==",+ "node_modules/@otplib/plugin-base32-scure": {+ "version": "13.3.0",+ "resolved": "https://registry.npmjs.org/@otplib/plugin-base32-scure/-/plugin-base32-scure-13.3.0.tgz",+ "integrity": "sha512-/jYbL5S6GB0Ie3XGEWtLIr9s5ZICl/BfmNL7+8/W7usZaUU4GiyLd2S+JGsNCslPyqNekSudD864nDAvRI0s8w==","dev": true,"license": "MIT","dependencies": {- "@otplib/core": "^12.0.1",- "thirty-two": "^1.0.2"+ "@otplib/core": "13.3.0",+ "@scure/base": "^2.0.0"}},- "node_modules/@otplib/preset-default": {- "version": "12.0.1",- "resolved": "https://registry.npmjs.org/@otplib/preset-default/-/preset-default-12.0.1.tgz",- "integrity": "sha512-xf1v9oOJRyXfluBhMdpOkr+bsE+Irt+0D5uHtvg6x1eosfmHCsCC6ej/m7FXiWqdo0+ZUI6xSKDhJwc8yfiOPQ==",+ "node_modules/@otplib/plugin-crypto-noble": {+ "version": "13.3.0",+ "resolved": "https://registry.npmjs.org/@otplib/plugin-crypto-noble/-/plugin-crypto-noble-13.3.0.tgz",+ "integrity": "sha512-wmV+jBVncepgwv99G7Plrdzd0tHfbpXk2U+OD7MO7DzpDqOYEgOPi+IIneksJSTL8QvWdfi+uQEuhnER4fKouA==","dev": true,"license": "MIT","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.3.0"}},- "node_modules/@otplib/preset-v11": {- "version": "12.0.1",- "resolved": "https://registry.npmjs.org/@otplib/preset-v11/-/preset-v11-12.0.1.tgz",- "integrity": "sha512-9hSetMI7ECqbFiKICrNa4w70deTUfArtwXykPUvSHWOdzOlfa9ajglu7mNCntlvxycTiOAXkQGwjQCzzDEMRMg==",+ "node_modules/@otplib/totp": {+ "version": "13.3.0",+ "resolved": "https://registry.npmjs.org/@otplib/totp/-/totp-13.3.0.tgz",+ "integrity": "sha512-XfjGNoN8d9S3Ove2j7AwkVV7+QDFsV7Lm7YwSiezNaHffkWtJ60aJYpmf+01dARdPST71U2ptueMsRJso4sq4A==","dev": true,"license": "MIT","dependencies": {- "@otplib/core": "^12.0.1",- "@otplib/plugin-crypto": "^12.0.1",- "@otplib/plugin-thirty-two": "^12.0.1"+ "@otplib/core": "13.3.0",+ "@otplib/hotp": "13.3.0",+ "@otplib/uri": "13.3.0"+ }+ },+ "node_modules/@otplib/uri": {+ "version": "13.3.0",+ "resolved": "https://registry.npmjs.org/@otplib/uri/-/uri-13.3.0.tgz",+ "integrity": "sha512-3oh6nBXy+cm3UX9cxEAGZiDrfxHU2gfelYFV+XNCx+8dq39VaQVymwlU2yjPZiMAi/3agaUeEftf2RwM5F+Cyg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@otplib/core": "13.3.0"}},"node_modules/@paddle/paddle-js": {@@ -3631,6 +3654,16 @@"win32"]},+ "node_modules/@scure/base": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/@scure/base/-/base-2.0.0.tgz",+ "integrity": "sha512-3E1kpuZginKkek01ovG8krQ0Z44E3DHPjc5S2rjJw9lZn3KSQOs8S7wqikF/AH7iRanHypj85uGyxk0XAyC37w==",+ "dev": true,+ "license": "MIT",+ "funding": {+ "url": "https://paulmillr.com/funding/"+ }+ },"node_modules/@sindresorhus/is": {"version": "4.6.0","resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-4.6.0.tgz",@@ -10594,15 +10627,18 @@}},"node_modules/otplib": {- "version": "12.0.1",- "resolved": "https://registry.npmjs.org/otplib/-/otplib-12.0.1.tgz",- "integrity": "sha512-xDGvUOQjop7RDgxTQ+o4pOol0/3xSZzawTiPKRrHnQWAy0WjhNs/5HdIDJCrqC4MBynmjXgULc6YfioaxZeFgg==",+ "version": "13.3.0",+ "resolved": "https://registry.npmjs.org/otplib/-/otplib-13.3.0.tgz",+ "integrity": "sha512-VYMKyyDG8yt2q+z58sz54/EIyTh7+tyMrjeemR44iVh5+dkKtIs57irTqxjH+IkAL1uMmG1JIFhG5CxTpqdU5g==","dev": true,"license": "MIT","dependencies": {- "@otplib/core": "^12.0.1",- "@otplib/preset-default": "^12.0.1",- "@otplib/preset-v11": "^12.0.1"+ "@otplib/core": "13.3.0",+ "@otplib/hotp": "13.3.0",+ "@otplib/plugin-base32-scure": "13.3.0",+ "@otplib/plugin-crypto-noble": "13.3.0",+ "@otplib/totp": "13.3.0",+ "@otplib/uri": "13.3.0"}},"node_modules/own-keys": {@@ -12672,15 +12708,6 @@"dev": true,"license": "MIT"},- "node_modules/thirty-two": {- "version": "1.0.2",- "resolved": "https://registry.npmjs.org/thirty-two/-/thirty-two-1.0.2.tgz",- "integrity": "sha512-OEI0IWCe+Dw46019YLl6V10Us5bi574EvlJEOcAkB29IzQ/mYD1A6RyNHLjZPiHCmuodxvgF6U+vZO1L15lxVA==",- "dev": true,- "engines": {- "node": ">=0.2.6"- }- },"node_modules/timeago.js": {"version": "4.0.2","resolved": "https://registry.npmjs.org/timeago.js/-/timeago.js-4.0.2.tgz",diff --git a/apps/web/package.json b/apps/web/package.jsonindex 21b270c9f..c0e4156e8 100644--- a/apps/web/package.json+++ b/apps/web/package.json@@ -113,7 +113,7 @@"happy-dom": "16.0.1","ip": "^2.0.1","lorem-ipsum": "^2.0.4",- "otplib": "^12.0.1",+ "otplib": "^13.3.0","rollup-plugin-visualizer": "^5.13.1","vite": "5.4.11","vite-plugin-env-compatible": "^2.0.1",