@micha.bigler/ui-core-micha 1.2.9 → 1.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth/authApi.js +5 -9
- package/package.json +1 -1
- package/src/auth/authApi.jsx +9 -10
package/dist/auth/authApi.js
CHANGED
|
@@ -336,18 +336,14 @@ export async function loginWithPasskey() {
|
|
|
336
336
|
throw new Error(extractErrorMessage(err));
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
/**
|
|
340
|
-
* Loads all authenticators and filters for WebAuthn passkeys.
|
|
341
|
-
*/
|
|
342
339
|
export async function fetchPasskeys() {
|
|
343
|
-
const res = await axios.get(
|
|
344
|
-
|
|
340
|
+
const res = await axios.get(`${USERS_BASE}/passkeys/`, // <-- nicht HEADLESS_BASE
|
|
341
|
+
{ withCredentials: true });
|
|
342
|
+
return Array.isArray(res.data) ? res.data : [];
|
|
345
343
|
}
|
|
346
|
-
/**
|
|
347
|
-
* Deletes a single passkey authenticator by id.
|
|
348
|
-
*/
|
|
349
344
|
export async function deletePasskey(id) {
|
|
350
|
-
await axios.delete(
|
|
345
|
+
await axios.delete(`${USERS_BASE}/passkeys/${id}/`, // <-- DRF-ViewSet-URL
|
|
346
|
+
{ withCredentials: true });
|
|
351
347
|
}
|
|
352
348
|
// -----------------------------
|
|
353
349
|
// Aggregated API object
|
package/package.json
CHANGED
package/src/auth/authApi.jsx
CHANGED
|
@@ -444,20 +444,19 @@ export async function loginWithPasskey() {
|
|
|
444
444
|
throw new Error(extractErrorMessage(err));
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
|
-
/**
|
|
448
|
-
* Loads all authenticators and filters for WebAuthn passkeys.
|
|
449
|
-
*/
|
|
450
447
|
export async function fetchPasskeys() {
|
|
451
|
-
const res = await axios.get(
|
|
452
|
-
|
|
448
|
+
const res = await axios.get(
|
|
449
|
+
`${USERS_BASE}/passkeys/`, // <-- nicht HEADLESS_BASE
|
|
450
|
+
{ withCredentials: true },
|
|
451
|
+
);
|
|
452
|
+
return Array.isArray(res.data) ? res.data : [];
|
|
453
453
|
}
|
|
454
454
|
|
|
455
|
-
|
|
456
|
-
/**
|
|
457
|
-
* Deletes a single passkey authenticator by id.
|
|
458
|
-
*/
|
|
459
455
|
export async function deletePasskey(id) {
|
|
460
|
-
await axios.delete(
|
|
456
|
+
await axios.delete(
|
|
457
|
+
`${USERS_BASE}/passkeys/${id}/`, // <-- DRF-ViewSet-URL
|
|
458
|
+
{ withCredentials: true },
|
|
459
|
+
);
|
|
461
460
|
}
|
|
462
461
|
|
|
463
462
|
// -----------------------------
|