@calimero-network/mero-js 29.7.4 → 29.7.5
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/cloud-v2/passkey.d.ts +17 -0
- package/dist/cloud-v2/passkey.js +17 -14
- package/dist/index.browser.mjs +1 -1
- package/dist/index.browser.mjs.map +3 -3
- package/dist/index.cjs +7 -13
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +7 -13
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1727,19 +1727,13 @@ function cancelled(message) {
|
|
|
1727
1727
|
}
|
|
1728
1728
|
async function ask(method, options) {
|
|
1729
1729
|
const container = navigator.credentials;
|
|
1730
|
-
const
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
} catch (error) {
|
|
1734
|
-
const own = globalThis.CredentialsContainer?.prototype?.[method];
|
|
1735
|
-
if (!own || own === page || !stuck(error)) throw error;
|
|
1736
|
-
return own.call(container, options);
|
|
1737
|
-
}
|
|
1730
|
+
const own = globalThis.CredentialsContainer?.prototype?.[method];
|
|
1731
|
+
const call = own ?? container[method];
|
|
1732
|
+
return call.call(container, options);
|
|
1738
1733
|
}
|
|
1739
|
-
function
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
);
|
|
1734
|
+
function es256First(params) {
|
|
1735
|
+
const es256 = params.filter((p) => p.alg === -7);
|
|
1736
|
+
return es256.length ? es256 : params;
|
|
1743
1737
|
}
|
|
1744
1738
|
function browserPasskey() {
|
|
1745
1739
|
return {
|
|
@@ -1750,7 +1744,7 @@ function browserPasskey() {
|
|
|
1750
1744
|
challenge: buf(fromB64url(o.challenge)),
|
|
1751
1745
|
rp: o.rp,
|
|
1752
1746
|
user: { ...o.user, id: buf(fromB64url(o.user.id)) },
|
|
1753
|
-
pubKeyCredParams: o.pubKeyCredParams,
|
|
1747
|
+
pubKeyCredParams: es256First(o.pubKeyCredParams),
|
|
1754
1748
|
excludeCredentials: (o.excludeCredentials ?? []).map((c) => ({
|
|
1755
1749
|
type: c.type,
|
|
1756
1750
|
id: buf(fromB64url(c.id))
|