mirror of
https://github.com/inventree/InvenTree.git
synced 2026-09-27 14:16:02 +00:00
feat(frontend): remove old deps (#12857)
Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
@@ -59,7 +59,6 @@
|
|||||||
"@fullcalendar/daygrid": "^6.1.21",
|
"@fullcalendar/daygrid": "^6.1.21",
|
||||||
"@fullcalendar/interaction": "^6.1.21",
|
"@fullcalendar/interaction": "^6.1.21",
|
||||||
"@fullcalendar/react": "6.1.21",
|
"@fullcalendar/react": "6.1.21",
|
||||||
"@github/webauthn-json": "^2.1.1",
|
|
||||||
"@lingui/core": "^5.9.2",
|
"@lingui/core": "^5.9.2",
|
||||||
"@lingui/react": "^5.9.2",
|
"@lingui/react": "^5.9.2",
|
||||||
"@mantine/carousel": "^9.2.1",
|
"@mantine/carousel": "^9.2.1",
|
||||||
|
|||||||
@@ -1,8 +1,3 @@
|
|||||||
import {
|
|
||||||
type CredentialRequestOptionsJSON,
|
|
||||||
get,
|
|
||||||
parseRequestOptionsFromJSON
|
|
||||||
} from '@github/webauthn-json/browser-ponyfill';
|
|
||||||
import { ApiEndpoints } from '@lib/enums/ApiEndpoints';
|
import { ApiEndpoints } from '@lib/enums/ApiEndpoints';
|
||||||
import { apiUrl } from '@lib/functions/Api';
|
import { apiUrl } from '@lib/functions/Api';
|
||||||
import { getBaseUrl } from '@lib/functions/Navigation';
|
import { getBaseUrl } from '@lib/functions/Navigation';
|
||||||
@@ -798,11 +793,9 @@ export async function handleWebauthnLogin(
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const credential = await get(
|
const publicKey =
|
||||||
parseRequestOptionsFromJSON(
|
PublicKeyCredential.parseRequestOptionsFromJSON(webauthn_challenge);
|
||||||
webauthn_challenge as CredentialRequestOptionsJSON
|
const credential = await navigator.credentials.get({ publicKey });
|
||||||
)
|
|
||||||
);
|
|
||||||
await api
|
await api
|
||||||
.post(apiUrl(ApiEndpoints.auth_webauthn_login), {
|
.post(apiUrl(ApiEndpoints.auth_webauthn_login), {
|
||||||
credential: credential
|
credential: credential
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import { create } from '@github/webauthn-json/browser-ponyfill';
|
|
||||||
import { CopyButton } from '@lib/components/CopyButton';
|
import { CopyButton } from '@lib/components/CopyButton';
|
||||||
import { StylishText } from '@lib/components/StylishText';
|
import { StylishText } from '@lib/components/StylishText';
|
||||||
import { ApiEndpoints } from '@lib/enums/ApiEndpoints';
|
import { ApiEndpoints } from '@lib/enums/ApiEndpoints';
|
||||||
@@ -761,9 +760,11 @@ export default function MFASettings() {
|
|||||||
|
|
||||||
// Register a WebAuthn credential with the provided key
|
// Register a WebAuthn credential with the provided key
|
||||||
const registerWebauthn = useCallback((key: any) => {
|
const registerWebauthn = useCallback((key: any) => {
|
||||||
create({
|
navigator.credentials
|
||||||
|
.create({
|
||||||
publicKey: PublicKeyCredential.parseCreationOptionsFromJSON(key)
|
publicKey: PublicKeyCredential.parseCreationOptionsFromJSON(key)
|
||||||
}).then((credential) => {
|
})
|
||||||
|
.then((credential) => {
|
||||||
const credentialString: string = JSON.stringify(credential);
|
const credentialString: string = JSON.stringify(credential);
|
||||||
|
|
||||||
api
|
api
|
||||||
|
|||||||
@@ -987,11 +987,6 @@
|
|||||||
resolved "https://registry.yarnpkg.com/@fullcalendar/react/-/react-6.1.21.tgz#6f396ab7460d3ad9d07f4c32b1ac483b9b21120f"
|
resolved "https://registry.yarnpkg.com/@fullcalendar/react/-/react-6.1.21.tgz#6f396ab7460d3ad9d07f4c32b1ac483b9b21120f"
|
||||||
integrity sha512-TLpmGUd5k/PMdCh8XbeFC9PW9wuGvMms1oCxWgXyjK3EFPXAAd0PLfcvwKdyxoAS5eK1E4RJFkjMHvsYHpimcg==
|
integrity sha512-TLpmGUd5k/PMdCh8XbeFC9PW9wuGvMms1oCxWgXyjK3EFPXAAd0PLfcvwKdyxoAS5eK1E4RJFkjMHvsYHpimcg==
|
||||||
|
|
||||||
"@github/webauthn-json@^2.1.1":
|
|
||||||
version "2.1.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/@github/webauthn-json/-/webauthn-json-2.1.1.tgz#648e63fc28050917d2882cc2b27817a88cb420fc"
|
|
||||||
integrity sha512-XrftRn4z75SnaJOmZQbt7Mk+IIjqVHw+glDGOxuHwXkZBZh/MBoRS7MHjSZMDaLhT4RjN2VqiEU7EOYleuJWSQ==
|
|
||||||
|
|
||||||
"@istanbuljs/load-nyc-config@^1.0.0", "@istanbuljs/load-nyc-config@^1.1.0":
|
"@istanbuljs/load-nyc-config@^1.0.0", "@istanbuljs/load-nyc-config@^1.1.0":
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced"
|
resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced"
|
||||||
|
|||||||
Reference in New Issue
Block a user