@learncard/lca-api-plugin 1.2.20 → 1.2.22
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/lca-api-plugin.cjs.development.cjs +12 -7
- package/dist/lca-api-plugin.cjs.development.cjs.map +2 -2
- package/dist/lca-api-plugin.cjs.production.min.cjs +1 -1
- package/dist/lca-api-plugin.cjs.production.min.cjs.map +3 -3
- package/dist/lca-api-plugin.esm.js +12 -7
- package/dist/lca-api-plugin.esm.js.map +2 -2
- package/dist/types.d.ts +17 -1
- package/package.json +5 -5
- package/src/plugin.ts +11 -6
- package/src/types.ts +4 -1
|
@@ -15213,11 +15213,15 @@ __name(toUint8Array, "toUint8Array");
|
|
|
15213
15213
|
|
|
15214
15214
|
// src/plugin.ts
|
|
15215
15215
|
var getNewClient = /* @__PURE__ */ __name(async (url2, learnCard, extraHeaders) => {
|
|
15216
|
-
return (0, import_lca_api_client.getClient)(
|
|
15217
|
-
|
|
15218
|
-
|
|
15219
|
-
|
|
15220
|
-
|
|
15216
|
+
return (0, import_lca_api_client.getClient)(
|
|
15217
|
+
url2,
|
|
15218
|
+
async (challenge) => {
|
|
15219
|
+
const jwt2 = await learnCard.invoke.getDidAuthVp({ proofFormat: "jwt", challenge });
|
|
15220
|
+
if (typeof jwt2 !== "string") throw new Error("Error getting DID-Auth-JWT!");
|
|
15221
|
+
return jwt2;
|
|
15222
|
+
},
|
|
15223
|
+
extraHeaders
|
|
15224
|
+
);
|
|
15221
15225
|
}, "getNewClient");
|
|
15222
15226
|
var getEncryptionJwk = /* @__PURE__ */ __name(async (client, learnCard) => {
|
|
15223
15227
|
const key = await client.utilities.getEncryptionKey.query();
|
|
@@ -15483,11 +15487,12 @@ var getLCAPlugin = /* @__PURE__ */ __name(async (initialLearnCard, url2, useCust
|
|
|
15483
15487
|
});
|
|
15484
15488
|
return result || null;
|
|
15485
15489
|
}, "authenticateWithScoutsSSO"),
|
|
15486
|
-
sendLoginVerificationCode: /* @__PURE__ */ __name(async (_learnCard, email3) => {
|
|
15490
|
+
sendLoginVerificationCode: /* @__PURE__ */ __name(async (_learnCard, email3, locale) => {
|
|
15487
15491
|
await initialized;
|
|
15488
15492
|
await updateLearnCard(_learnCard);
|
|
15489
15493
|
const result = await client.firebase.sendLoginVerificationCode.mutate({
|
|
15490
|
-
email: email3
|
|
15494
|
+
email: email3,
|
|
15495
|
+
locale
|
|
15491
15496
|
});
|
|
15492
15497
|
return result;
|
|
15493
15498
|
}, "sendLoginVerificationCode"),
|