diff --git a/package.json b/package.json index fe19213..4768e3b 100644 --- a/package.json +++ b/package.json @@ -15,13 +15,13 @@ "license": "Big Time Public License", "dependencies": { "@paralleldrive/cuid2": "^2.2.2", - "@simplewebauthn/server": "^7.4.0", + "@simplewebauthn/server": "^8.1.1", "argon2": "^0.31.1", "better-sqlite3": "^8.6.0", "compadre": "^3.2.0", "cookie": "^0.5.0", "dotenv": "^16.3.1", - "emailjs": "^4.0.2", + "emailjs": "^4.0.3", "fastify": "^4.22.2", "fastify-plugin": "^4.5.1", "jose": "^4.14.6" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2296b82..795fcde 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,8 +9,8 @@ dependencies: specifier: ^2.2.2 version: 2.2.2 '@simplewebauthn/server': - specifier: ^7.4.0 - version: 7.4.0 + specifier: ^8.1.1 + version: 8.1.1 argon2: specifier: ^0.31.1 version: 0.31.1 @@ -27,8 +27,8 @@ dependencies: specifier: ^16.3.1 version: 16.3.1 emailjs: - specifier: ^4.0.2 - version: 4.0.2 + specifier: ^4.0.3 + version: 4.0.3 fastify: specifier: ^4.22.2 version: 4.22.2 @@ -165,7 +165,7 @@ packages: npmlog: 5.0.1 rimraf: 3.0.2 semver: 7.5.4 - tar: 6.1.15 + tar: 6.2.0 transitivePeerDependencies: - encoding - supports-color @@ -252,16 +252,8 @@ packages: engines: {node: '>=10'} dev: false - /@simplewebauthn/iso-webcrypto@7.4.0: - resolution: {integrity: sha512-LSx8zghjH+z9IFOhBdDv2AyhqnzDUCYFxFiwJbToowOigCgf4Y8fyZle9Y+0NS232bIoU6j/lgv5iT32m3eGyA==} - deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. - dependencies: - '@simplewebauthn/typescript-types': 7.4.0 - '@types/node': 18.17.14 - dev: false - - /@simplewebauthn/server@7.4.0: - resolution: {integrity: sha512-Y6jj2WsE3zBDagSdOg3b7+SMw7zHku0Od45Q1ZpA19Wd5aUbV2mH281SbdhFN4UuKcGQSeeAgUObAWHvgxNOVA==} + /@simplewebauthn/server@8.1.1: + resolution: {integrity: sha512-fJ0Ux9eV5oLa6gowHiUXx+oDqh6DhDK/w1oenn8p9+MhZDCXtLOIWl3Crgq5FLnwOuX9NpJzHgmgaOk2b8Tojg==} engines: {node: '>=16.0.0'} dependencies: '@hexagon/base64': 1.1.27 @@ -270,40 +262,21 @@ packages: '@peculiar/asn1-rsa': 2.3.6 '@peculiar/asn1-schema': 2.3.6 '@peculiar/asn1-x509': 2.3.6 - '@simplewebauthn/iso-webcrypto': 7.4.0 - '@simplewebauthn/typescript-types': 7.4.0 - '@types/debug': 4.1.8 - '@types/node': 18.17.14 + '@simplewebauthn/typescript-types': 8.0.0 cbor-x: 1.5.4 - cross-fetch: 3.1.8 - debug: 4.3.4 + cross-fetch: 4.0.0 transitivePeerDependencies: - encoding - - supports-color - dev: false - - /@simplewebauthn/typescript-types@7.4.0: - resolution: {integrity: sha512-8/ZjHeUPe210Bt5oyaOIGx4h8lHdsQs19BiOT44gi/jBEgK7uBGA0Fy7NRsyh777al3m6WM0mBf0UR7xd4R7WQ==} dev: false - /@types/debug@4.1.8: - resolution: {integrity: sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==} - dependencies: - '@types/ms': 0.7.31 + /@simplewebauthn/typescript-types@8.0.0: + resolution: {integrity: sha512-d7Izb2H+LZJteXMkS8DmpAarD6mZdpIOu/av/yH4/u/3Pd6DKFLyBM3j8BMmUvUqpzvJvHARNrRfQYto58mtTQ==} dev: false /@types/minimist@1.2.2: resolution: {integrity: sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==} dev: true - /@types/ms@0.7.31: - resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==} - dev: false - - /@types/node@18.17.14: - resolution: {integrity: sha512-ZE/5aB73CyGqgQULkLG87N9GnyGe5TcQjv34pwS8tfBs1IkCh0ASM69mydb2znqd6v0eX+9Ytvk6oQRqu8T1Vw==} - dev: false - /@types/normalize-package-data@2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true @@ -980,8 +953,8 @@ packages: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} dev: true - /cross-fetch@3.1.8: - resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} + /cross-fetch@4.0.0: + resolution: {integrity: sha512-e4a5N8lVvuLgAWgnCrLr2PP0YyDOTHa9H/Rj54dirp61qXnNq46m82bRhNqIA5VccJtWBvPTFRV3TtvHUKPB1g==} dependencies: node-fetch: 2.7.0 transitivePeerDependencies: @@ -1079,8 +1052,8 @@ packages: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} dev: true - /emailjs@4.0.2: - resolution: {integrity: sha512-w/tldI93qO7uw9XzdwCCRR36OY/TYJxB81vEOmQkmxVDZOdrAnoQoOAvaMoDmmBUSoD1msyAIwBdKFWzC7lgKQ==} + /emailjs@4.0.3: + resolution: {integrity: sha512-1CDXoE3FxkSg7QRTlLsDCYG9elFNu/JQsYWu3Xfrk77ubbg5zYgFGg+JRUKQJ56mceM8o3rHHX0VB4wo9XsyLQ==} engines: {node: '>=12'} peerDependencies: typescript: '>=4.3.5' @@ -1228,7 +1201,7 @@ packages: fast-json-stringify: 5.8.0 find-my-way: 7.6.2 light-my-request: 5.10.0 - pino: 8.15.0 + pino: 8.15.1 process-warning: 2.2.0 proxy-addr: 2.0.7 rfdc: 1.3.0 @@ -2131,8 +2104,8 @@ packages: engines: {node: '>=4'} dev: true - /pino-abstract-transport@1.0.0: - resolution: {integrity: sha512-c7vo5OpW4wIS42hUVcT5REsL8ZljsUfBjqV/e2sFxmFEFZiq1XLUp5EYLtuDH6PEHq9W1egWqRbnLUP5FuZmOA==} + /pino-abstract-transport@1.1.0: + resolution: {integrity: sha512-lsleG3/2a/JIWUtf9Q5gUNErBqwIu1tUKTT3dUzaf5DySw9ra1wcqKjJjLX1VTY64Wk1eEOYsVGSaGfCK85ekA==} dependencies: readable-stream: 4.4.2 split2: 4.2.0 @@ -2142,14 +2115,14 @@ packages: resolution: {integrity: sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA==} dev: false - /pino@8.15.0: - resolution: {integrity: sha512-olUADJByk4twxccmAxb1RiGKOSvddHugCV3wkqjyv+3Sooa2KLrmXrKEWOKi0XPCLasRR5jBXxioE1jxUa4KzQ==} + /pino@8.15.1: + resolution: {integrity: sha512-Cp4QzUQrvWCRJaQ8Lzv0mJzXVk4z2jlq8JNKMGaixC2Pz5L4l2p95TkuRvYbrEbe85NQsDKrAd4zalf7Ml6WiA==} hasBin: true dependencies: atomic-sleep: 1.0.0 fast-redact: 3.3.0 on-exit-leak-free: 2.1.0 - pino-abstract-transport: 1.0.0 + pino-abstract-transport: 1.1.0 pino-std-serializers: 6.2.2 process-warning: 2.2.0 quick-format-unescaped: 4.0.4 @@ -2666,8 +2639,8 @@ packages: readable-stream: 3.6.2 dev: false - /tar@6.1.15: - resolution: {integrity: sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A==} + /tar@6.2.0: + resolution: {integrity: sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==} engines: {node: '>=10'} dependencies: chownr: 2.0.0 diff --git a/services/webAuthn/loginOptions.js b/services/webAuthn/loginOptions.js index b783037..45619f1 100644 --- a/services/webAuthn/loginOptions.js +++ b/services/webAuthn/loginOptions.js @@ -16,7 +16,7 @@ export const loginOptionsHandler = async function (request, reply) { }; //generate options - const generatedOptions = generateAuthenticationOptions(opts); + const generatedOptions = await generateAuthenticationOptions(opts); //fetch cookies (we'll need session id. session id is set on page load in ui.routes.js) const cookies = parse(request.headers.cookie); diff --git a/services/webAuthn/registrationOptions.js b/services/webAuthn/registrationOptions.js index 109b54e..9f8ed50 100644 --- a/services/webAuthn/registrationOptions.js +++ b/services/webAuthn/registrationOptions.js @@ -39,7 +39,7 @@ export const registrationOptionsHandler = async function (request, reply) { }; //generate registration options to prepare the response - const generatedOptions = generateRegistrationOptions(options); + const generatedOptions = await generateRegistrationOptions(options); //Generate user data and create user in database //build jwtid diff --git a/ui/admin/loginAdminPage.html b/ui/admin/loginAdminPage.html index e51bd16..b3634e5 100644 --- a/ui/admin/loginAdminPage.html +++ b/ui/admin/loginAdminPage.html @@ -8,7 +8,7 @@ href="https://cdn.jsdelivr.net/npm/@unocss/reset/tailwind.min.css" /> - +