cauthy-auth 0.18.0 → 0.19.0
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/client.d.mts +13 -1
- package/dist/client.d.ts +13 -1
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/client.mjs +1 -1
- package/dist/client.mjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -1
- package/dist/index.mjs.map +1 -1
- package/dist/react.d.mts +17 -1
- package/dist/react.d.ts +17 -1
- package/dist/react.js +13 -5
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +13 -5
- package/dist/react.mjs.map +1 -1
- package/dist/svelte.d.mts +1 -1
- package/dist/svelte.d.ts +1 -1
- package/dist/svelte.js +1 -1
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +1 -1
- package/dist/svelte.mjs.map +1 -1
- package/dist/vue.d.mts +1 -1
- package/dist/vue.d.ts +1 -1
- package/dist/vue.js +1 -1
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +1 -1
- package/dist/vue.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -994,6 +994,7 @@ function createCauthy(given = {}) {
|
|
|
994
994
|
const passkeyOf = (d) => ({
|
|
995
995
|
id: String(d?.id ?? ""),
|
|
996
996
|
name: String(d?.nickname ?? ""),
|
|
997
|
+
kind: ["security_key", "synced", "device"].includes(d?.kind) ? d.kind : "unknown",
|
|
997
998
|
createdAt: String(d?.created_at ?? ""),
|
|
998
999
|
lastUsedAt: d?.last_used_at ? String(d.last_used_at) : null
|
|
999
1000
|
});
|
|
@@ -1409,7 +1410,8 @@ function createCauthy(given = {}) {
|
|
|
1409
1410
|
return json({ status: "unlinked", provider }, 200, mine.headers);
|
|
1410
1411
|
}
|
|
1411
1412
|
if (route === "/me/passkeys/add/begin") {
|
|
1412
|
-
const
|
|
1413
|
+
const kind = b.kind === "device" || b.kind === "security_key" ? b.kind : "";
|
|
1414
|
+
const res = await as("/v1/auth/webauthn/register/begin", { password, ...kind ? { kind } : {} });
|
|
1413
1415
|
if (res.error) return refused(res, res.error.code === "step_up_required" ? "password" : void 0);
|
|
1414
1416
|
const step = { kind: "enrol", token: String(res.data?.session_id ?? ""), returnTo: afterSignIn };
|
|
1415
1417
|
const h = new Headers(mine.headers);
|