@workos-inc/node 7.36.0 → 7.36.3

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.
@@ -106,6 +106,7 @@ describe('Actions', () => {
106
106
  },
107
107
  ipAddress: '50.141.123.10',
108
108
  userAgent: 'Mozilla/5.0',
109
+ deviceFingerprint: 'notafingerprint',
109
110
  issuer: 'test',
110
111
  object: 'authentication_action_context',
111
112
  organization: {
@@ -150,6 +151,7 @@ describe('Actions', () => {
150
151
  },
151
152
  ipAddress: '50.141.123.10',
152
153
  userAgent: 'Mozilla/5.0',
154
+ deviceFingerprint: 'notafingerprint',
153
155
  invitation: expect.objectContaining({
154
156
  object: 'invitation',
155
157
  id: '01JBVZWH8HJ855YZ5BWHG1WNZN',
@@ -13,6 +13,7 @@
13
13
  },
14
14
  "ip_address": "50.141.123.10",
15
15
  "user_agent": "Mozilla/5.0",
16
+ "device_fingerprint": "notafingerprint",
16
17
  "issuer": "test",
17
18
  "object": "authentication_action_context",
18
19
  "organization": {
@@ -8,6 +8,7 @@
8
8
  },
9
9
  "ip_address": "50.141.123.10",
10
10
  "user_agent": "Mozilla/5.0",
11
+ "device_fingerprint": "notafingerprint",
11
12
  "object": "user_registration_action_context",
12
13
  "invitation": {
13
14
  "object": "invitation",
@@ -8,6 +8,7 @@ interface AuthenticationActionContext {
8
8
  organizationMembership?: OrganizationMembership;
9
9
  ipAddress?: string;
10
10
  userAgent?: string;
11
+ deviceFingerprint?: string;
11
12
  issuer?: string;
12
13
  }
13
14
  export interface UserData {
@@ -23,6 +24,7 @@ interface UserRegistrationActionContext {
23
24
  invitation?: Invitation;
24
25
  ipAddress?: string;
25
26
  userAgent?: string;
27
+ deviceFingerprint?: string;
26
28
  }
27
29
  export type ActionContext = AuthenticationActionContext | UserRegistrationActionContext;
28
30
  interface AuthenticationActionPayload {
@@ -33,6 +35,7 @@ interface AuthenticationActionPayload {
33
35
  organization_membership?: OrganizationMembershipResponse;
34
36
  ip_address?: string;
35
37
  user_agent?: string;
38
+ device_fingerprint?: string;
36
39
  issuer?: string;
37
40
  }
38
41
  export interface UserDataPayload {
@@ -48,6 +51,7 @@ export interface UserRegistrationActionPayload {
48
51
  invitation?: InvitationResponse;
49
52
  ip_address?: string;
50
53
  user_agent?: string;
54
+ device_fingerprint?: string;
51
55
  }
52
56
  export type ActionPayload = AuthenticationActionPayload | UserRegistrationActionPayload;
53
57
  export {};
@@ -24,6 +24,7 @@ const deserializeAction = (actionPayload) => {
24
24
  : undefined,
25
25
  ipAddress: actionPayload.ip_address,
26
26
  userAgent: actionPayload.user_agent,
27
+ deviceFingerprint: actionPayload.device_fingerprint,
27
28
  };
28
29
  case 'authentication_action_context':
29
30
  return {
@@ -38,6 +39,7 @@ const deserializeAction = (actionPayload) => {
38
39
  : undefined,
39
40
  ipAddress: actionPayload.ip_address,
40
41
  userAgent: actionPayload.user_agent,
42
+ deviceFingerprint: actionPayload.device_fingerprint,
41
43
  issuer: actionPayload.issuer,
42
44
  };
43
45
  }
@@ -62,7 +62,9 @@ class UserManagement {
62
62
  this.ironSessionProvider = ironSessionProvider;
63
63
  // Set the JWKS URL. This is used to verify if the JWT is still valid
64
64
  this.jwks = clientId
65
- ? (0, jose_1.createRemoteJWKSet)(new URL(this.getJwksUrl(clientId)))
65
+ ? (0, jose_1.createRemoteJWKSet)(new URL(this.getJwksUrl(clientId)), {
66
+ cooldownDuration: 1000 * 60 * 5,
67
+ })
66
68
  : undefined;
67
69
  }
68
70
  /**
package/lib/workos.js CHANGED
@@ -29,7 +29,7 @@ const subtle_crypto_provider_1 = require("./common/crypto/subtle-crypto-provider
29
29
  const fetch_client_1 = require("./common/net/fetch-client");
30
30
  const widgets_1 = require("./widgets/widgets");
31
31
  const actions_1 = require("./actions/actions");
32
- const VERSION = '7.36.0';
32
+ const VERSION = '7.36.3';
33
33
  const DEFAULT_HOSTNAME = 'api.workos.com';
34
34
  const HEADER_AUTHORIZATION = 'Authorization';
35
35
  const HEADER_IDEMPOTENCY_KEY = 'Idempotency-Key';
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "7.36.0",
2
+ "version": "7.36.3",
3
3
  "name": "@workos-inc/node",
4
4
  "author": "WorkOS",
5
5
  "description": "A Node wrapper for the WorkOS API",
@@ -72,4 +72,5 @@
72
72
  "default": "./lib/index.js"
73
73
  }
74
74
  }
75
- }
75
+ }
76
+