@thunderid/express 0.12.1 → 1.0.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/cjs/index.cjs +11 -9
- package/dist/edge/index.js +11 -9
- package/dist/index.js +11 -9
- package/dist/middleware/flow.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -314,18 +314,20 @@ const handleFlow = () => {
|
|
|
314
314
|
const authUrl = await client.getSignInUrl();
|
|
315
315
|
resolvedAuthId = new URL(authUrl).searchParams.get("authId") ?? void 0;
|
|
316
316
|
}
|
|
317
|
+
const payload = executionId ? {
|
|
318
|
+
action: "submit",
|
|
319
|
+
challengeToken,
|
|
320
|
+
executionId,
|
|
321
|
+
inputs
|
|
322
|
+
} : {
|
|
323
|
+
applicationId,
|
|
324
|
+
flowType: flowType ?? "SIGN_IN"
|
|
325
|
+
};
|
|
317
326
|
const flowResponse = await (0, __thunderid_node.executeEmbeddedSignInFlow)({
|
|
318
327
|
authId: resolvedAuthId,
|
|
319
328
|
baseUrl,
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
challengeToken,
|
|
323
|
-
executionId,
|
|
324
|
-
inputs
|
|
325
|
-
} : {
|
|
326
|
-
applicationId,
|
|
327
|
-
flowType: flowType ?? "SIGN_IN"
|
|
328
|
-
},
|
|
329
|
+
flowSecret: config?.flowSecret ?? process.env["THUNDERID_FLOW_SECRET"],
|
|
330
|
+
payload,
|
|
329
331
|
url: (0, __thunderid_node.resolveResourceEndpoint)("flowExecute", config)
|
|
330
332
|
});
|
|
331
333
|
if (flowResponse.redirectUrl) {
|
package/dist/edge/index.js
CHANGED
|
@@ -291,18 +291,20 @@ const handleFlow = () => {
|
|
|
291
291
|
const authUrl = await client.getSignInUrl();
|
|
292
292
|
resolvedAuthId = new URL(authUrl).searchParams.get("authId") ?? void 0;
|
|
293
293
|
}
|
|
294
|
+
const payload = executionId ? {
|
|
295
|
+
action: "submit",
|
|
296
|
+
challengeToken,
|
|
297
|
+
executionId,
|
|
298
|
+
inputs
|
|
299
|
+
} : {
|
|
300
|
+
applicationId,
|
|
301
|
+
flowType: flowType ?? "SIGN_IN"
|
|
302
|
+
};
|
|
294
303
|
const flowResponse = await executeEmbeddedSignInFlow({
|
|
295
304
|
authId: resolvedAuthId,
|
|
296
305
|
baseUrl,
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
challengeToken,
|
|
300
|
-
executionId,
|
|
301
|
-
inputs
|
|
302
|
-
} : {
|
|
303
|
-
applicationId,
|
|
304
|
-
flowType: flowType ?? "SIGN_IN"
|
|
305
|
-
},
|
|
306
|
+
flowSecret: config?.flowSecret ?? process.env["THUNDERID_FLOW_SECRET"],
|
|
307
|
+
payload,
|
|
306
308
|
url: resolveResourceEndpoint("flowExecute", config)
|
|
307
309
|
});
|
|
308
310
|
if (flowResponse.redirectUrl) {
|
package/dist/index.js
CHANGED
|
@@ -291,18 +291,20 @@ const handleFlow = () => {
|
|
|
291
291
|
const authUrl = await client.getSignInUrl();
|
|
292
292
|
resolvedAuthId = new URL(authUrl).searchParams.get("authId") ?? void 0;
|
|
293
293
|
}
|
|
294
|
+
const payload = executionId ? {
|
|
295
|
+
action: "submit",
|
|
296
|
+
challengeToken,
|
|
297
|
+
executionId,
|
|
298
|
+
inputs
|
|
299
|
+
} : {
|
|
300
|
+
applicationId,
|
|
301
|
+
flowType: flowType ?? "SIGN_IN"
|
|
302
|
+
};
|
|
294
303
|
const flowResponse = await executeEmbeddedSignInFlow({
|
|
295
304
|
authId: resolvedAuthId,
|
|
296
305
|
baseUrl,
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
challengeToken,
|
|
300
|
-
executionId,
|
|
301
|
-
inputs
|
|
302
|
-
} : {
|
|
303
|
-
applicationId,
|
|
304
|
-
flowType: flowType ?? "SIGN_IN"
|
|
305
|
-
},
|
|
306
|
+
flowSecret: config?.flowSecret ?? process.env["THUNDERID_FLOW_SECRET"],
|
|
307
|
+
payload,
|
|
306
308
|
url: resolveResourceEndpoint("flowExecute", config)
|
|
307
309
|
});
|
|
308
310
|
if (flowResponse.redirectUrl) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../../src/middleware/flow.ts"],"names":[],"mappings":"AAIA,OAAO,OAAO,MAAM,SAAS,CAAC;AAG9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,QAAA,MAAM,UAAU,QAAO,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../../src/middleware/flow.ts"],"names":[],"mappings":"AAIA,OAAO,OAAO,MAAM,SAAS,CAAC;AAG9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,QAAA,MAAM,UAAU,QAAO,OAAO,CAAC,cA0D9B,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thunderid/express",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Express.js SDK for ThunderID",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"thunderid",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"uuid": "11.1.1",
|
|
51
|
-
"@thunderid/node": "^0.
|
|
51
|
+
"@thunderid/node": "^1.0.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"express": ">=4.21.2"
|