@thunderid/express 0.10.1 → 0.10.2

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.
@@ -335,7 +335,8 @@ const handleFlow = () => {
335
335
  res.status(500).json({ error: "SDK not initialised" });
336
336
  return;
337
337
  }
338
- const baseUrl = client.expressConfig?.baseUrl;
338
+ const config = client.expressConfig;
339
+ const baseUrl = config?.baseUrl;
339
340
  if (!baseUrl) {
340
341
  res.status(500).json({ error: "baseUrl is not configured" });
341
342
  return;
@@ -358,7 +359,8 @@ const handleFlow = () => {
358
359
  } : {
359
360
  applicationId,
360
361
  flowType: flowType ?? "SIGN_IN"
361
- }
362
+ },
363
+ url: (0, __thunderid_node.resolveResourceEndpoint)("flowExecute", config)
362
364
  });
363
365
  if (flowResponse.redirectUrl) {
364
366
  res.json({
@@ -1,4 +1,4 @@
1
- import { CookieConfig, ThunderIDAuthException, ThunderIDNodeClient, ThunderIDRuntimeError, executeEmbeddedSignInFlow, logger } from "@thunderid/node";
1
+ import { CookieConfig, ThunderIDAuthException, ThunderIDNodeClient, ThunderIDRuntimeError, executeEmbeddedSignInFlow, logger, resolveResourceEndpoint } from "@thunderid/node";
2
2
  import { v4 } from "uuid";
3
3
 
4
4
  export * from "@thunderid/node"
@@ -312,7 +312,8 @@ const handleFlow = () => {
312
312
  res.status(500).json({ error: "SDK not initialised" });
313
313
  return;
314
314
  }
315
- const baseUrl = client.expressConfig?.baseUrl;
315
+ const config = client.expressConfig;
316
+ const baseUrl = config?.baseUrl;
316
317
  if (!baseUrl) {
317
318
  res.status(500).json({ error: "baseUrl is not configured" });
318
319
  return;
@@ -335,7 +336,8 @@ const handleFlow = () => {
335
336
  } : {
336
337
  applicationId,
337
338
  flowType: flowType ?? "SIGN_IN"
338
- }
339
+ },
340
+ url: resolveResourceEndpoint("flowExecute", config)
339
341
  });
340
342
  if (flowResponse.redirectUrl) {
341
343
  res.json({
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { CookieConfig, ThunderIDAuthException, ThunderIDNodeClient, ThunderIDRuntimeError, executeEmbeddedSignInFlow, logger } from "@thunderid/node";
1
+ import { CookieConfig, ThunderIDAuthException, ThunderIDNodeClient, ThunderIDRuntimeError, executeEmbeddedSignInFlow, logger, resolveResourceEndpoint } from "@thunderid/node";
2
2
  import { v4 } from "uuid";
3
3
 
4
4
  export * from "@thunderid/node"
@@ -312,7 +312,8 @@ const handleFlow = () => {
312
312
  res.status(500).json({ error: "SDK not initialised" });
313
313
  return;
314
314
  }
315
- const baseUrl = client.expressConfig?.baseUrl;
315
+ const config = client.expressConfig;
316
+ const baseUrl = config?.baseUrl;
316
317
  if (!baseUrl) {
317
318
  res.status(500).json({ error: "baseUrl is not configured" });
318
319
  return;
@@ -335,7 +336,8 @@ const handleFlow = () => {
335
336
  } : {
336
337
  applicationId,
337
338
  flowType: flowType ?? "SIGN_IN"
338
- }
339
+ },
340
+ url: resolveResourceEndpoint("flowExecute", config)
339
341
  });
340
342
  if (flowResponse.redirectUrl) {
341
343
  res.json({
@@ -1 +1 @@
1
- {"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../../src/middleware/flow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,OAAO,MAAM,SAAS,CAAC;AAG9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,QAAA,MAAM,UAAU,QAAO,OAAO,CAAC,cAwD9B,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"flow.d.ts","sourceRoot":"","sources":["../../src/middleware/flow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,OAAO,MAAM,SAAS,CAAC;AAG9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,QAAA,MAAM,UAAU,QAAO,OAAO,CAAC,cAyD9B,CAAC;AAEF,eAAe,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thunderid/express",
3
- "version": "0.10.1",
3
+ "version": "0.10.2",
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.11.1"
51
+ "@thunderid/node": "^0.11.2"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "express": ">=4.21.2"