workos 5.27.0 → 5.29.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4c13739c752d0a39953650ceaa9ce3b11975333deaee4c3308e68aaf498a81b
4
- data.tar.gz: 0d1e38dab645be1e74296de37deeb02115e1ef8528c7a2d96a751b0ec8586312
3
+ metadata.gz: 65fed812ccb7c97df25793369c07af5024b6cb7e1a12675c125bbdf4f3fd5730
4
+ data.tar.gz: b38903b53ed0bad99605ba619453f7fab5653d67baefa0313b6768a81faf0cd6
5
5
  SHA512:
6
- metadata.gz: f4b7db5351ad49b0c388213769e7d5fb32121eed25999ba75476691c41bc5bd1ce792910912843869440d7ae28734405233cca551d324fb5507d9dabd9c3c04d
7
- data.tar.gz: d4fba87cbf558a37b3e563f189aeb00e93fad7bfe58fd93473fa615d190c5180756c5de19aa9a0510fc95bf3feb9719c7994d4cdb85b1e405679639d23e85e6b
6
+ metadata.gz: 3a06ceb94077a433ac395d1f979209df0a3473f201843c09dc622ebbf389817fc05377556a84ce363d5d9eecf69a8dba9182581ff1b78450cff22cdef4aaf520
7
+ data.tar.gz: 7a746ec3b9930327ad6961da2132be517735f204cc548c4c8c8a36f88db1b85d177daf6225ee947cb90a6b27cc6a0121ba37dd1fea4976f28ad84d11cda84f16
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- workos (5.27.0)
4
+ workos (5.29.0)
5
5
  encryptor (~> 3.0)
6
6
  jwt (~> 2.8)
7
7
 
@@ -29,9 +29,10 @@ module WorkOS
29
29
  end
30
30
 
31
31
  # Authenticates the user based on the session data
32
+ # @param include_expired [Boolean] If true, returns decoded token data even when expired (default: false)
32
33
  # @return [Hash] A hash containing the authentication response and a reason if the authentication failed
33
- # rubocop:disable Metrics/AbcSize
34
- def authenticate
34
+ # rubocop:disable Metrics/AbcSize, Metrics/PerceivedComplexity
35
+ def authenticate(include_expired: false)
35
36
  return { authenticated: false, reason: 'NO_SESSION_COOKIE_PROVIDED' } if @session_data.nil?
36
37
 
37
38
  begin
@@ -41,23 +42,41 @@ module WorkOS
41
42
  end
42
43
 
43
44
  return { authenticated: false, reason: 'INVALID_SESSION_COOKIE' } unless session[:access_token]
44
- return { authenticated: false, reason: 'INVALID_JWT' } unless is_valid_jwt(session[:access_token])
45
-
46
- decoded = JWT.decode(session[:access_token], nil, true, algorithms: @jwks_algorithms, jwks: @jwks).first
47
-
48
- {
49
- authenticated: true,
50
- session_id: decoded['sid'],
51
- organization_id: decoded['org_id'],
52
- role: decoded['role'],
53
- roles: decoded['roles'],
54
- permissions: decoded['permissions'],
55
- entitlements: decoded['entitlements'],
56
- feature_flags: decoded['feature_flags'],
57
- user: session[:user],
58
- impersonator: session[:impersonator],
59
- reason: nil,
60
- }
45
+
46
+ begin
47
+ decoded = JWT.decode(
48
+ session[:access_token],
49
+ nil,
50
+ true,
51
+ algorithms: @jwks_algorithms,
52
+ jwks: @jwks,
53
+ verify_expiration: false,
54
+ ).first
55
+
56
+ expired = decoded['exp'] && decoded['exp'] < Time.now.to_i
57
+
58
+ # Early return for expired tokens when not including expired data (backward compatible)
59
+ return { authenticated: false, reason: 'INVALID_JWT' } if expired && !include_expired
60
+
61
+ # Return full data for valid tokens or when include_expired is true
62
+ {
63
+ authenticated: !expired,
64
+ session_id: decoded['sid'],
65
+ organization_id: decoded['org_id'],
66
+ role: decoded['role'],
67
+ roles: decoded['roles'],
68
+ permissions: decoded['permissions'],
69
+ entitlements: decoded['entitlements'],
70
+ feature_flags: decoded['feature_flags'],
71
+ user: session[:user],
72
+ impersonator: session[:impersonator],
73
+ reason: expired ? 'INVALID_JWT' : nil,
74
+ }
75
+ rescue JWT::DecodeError
76
+ { authenticated: false, reason: 'INVALID_JWT' }
77
+ rescue StandardError => e
78
+ { authenticated: false, reason: e.message }
79
+ end
61
80
  end
62
81
 
63
82
  # Refreshes the session data using the refresh token stored in the session data
@@ -66,7 +85,6 @@ module WorkOS
66
85
  # @option options [String] :organization_id The organization ID to use for refreshing the session
67
86
  # @return [Hash] A hash containing a new sealed session, the authentication response,
68
87
  # and a reason if the refresh failed
69
- # rubocop:disable Metrics/PerceivedComplexity
70
88
  def refresh(options = nil)
71
89
  cookie_password = options.nil? || options[:cookie_password].nil? ? @cookie_password : options[:cookie_password]
72
90
 
@@ -168,17 +186,5 @@ module WorkOS
168
186
 
169
187
  jwks
170
188
  end
171
-
172
- # Validates a JWT token using the JWKS set
173
- # @param token [String] The JWT token to validate
174
- # @return [Boolean] True if the token is valid, false otherwise
175
- # rubocop:disable Naming/PredicateName
176
- def is_valid_jwt(token)
177
- JWT.decode(token, nil, true, algorithms: @jwks_algorithms, jwks: @jwks)
178
- true
179
- rescue StandardError
180
- false
181
- end
182
- # rubocop:enable Naming/PredicateName
183
189
  end
184
190
  end
@@ -869,7 +869,7 @@ module WorkOS
869
869
  ),
870
870
  )
871
871
 
872
- WorkOS::User.new(response.body)
872
+ WorkOS::UserResponse.new(response.body).user
873
873
  end
874
874
 
875
875
  # Get an Organization Membership
@@ -1139,6 +1139,22 @@ module WorkOS
1139
1139
  WorkOS::Invitation.new(response.body)
1140
1140
  end
1141
1141
 
1142
+ # Resends an existing Invitation.
1143
+ #
1144
+ # @param [String] id The unique ID of the Invitation.
1145
+ #
1146
+ # @return WorkOS::Invitation
1147
+ def resend_invitation(id:)
1148
+ request = post_request(
1149
+ path: "/user_management/invitations/#{id}/resend",
1150
+ auth: true,
1151
+ )
1152
+
1153
+ response = execute_request(request: request)
1154
+
1155
+ WorkOS::Invitation.new(response.body)
1156
+ end
1157
+
1142
1158
  private
1143
1159
 
1144
1160
  def validate_session(session)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WorkOS
4
- VERSION = '5.27.0'
4
+ VERSION = '5.29.0'
5
5
  end
@@ -160,6 +160,44 @@ describe WorkOS::Session do
160
160
  expect(result).to eq({ authenticated: false, reason: 'INVALID_JWT' })
161
161
  end
162
162
 
163
+ it 'returns INVALID_JWT without token data when session is expired' do
164
+ session = WorkOS::Session.new(
165
+ user_management: user_management,
166
+ client_id: client_id,
167
+ session_data: session_data,
168
+ cookie_password: cookie_password,
169
+ )
170
+ allow_any_instance_of(JWT::Decode).to receive(:verify_signature).and_return(true)
171
+ allow(Time).to receive(:now).and_return(Time.at(9_999_999_999))
172
+ result = session.authenticate
173
+ expect(result).to eq({ authenticated: false, reason: 'INVALID_JWT' })
174
+ end
175
+
176
+ it 'returns INVALID_JWT with full token data when session is expired and include_expired is true' do
177
+ session = WorkOS::Session.new(
178
+ user_management: user_management,
179
+ client_id: client_id,
180
+ session_data: session_data,
181
+ cookie_password: cookie_password,
182
+ )
183
+ allow_any_instance_of(JWT::Decode).to receive(:verify_signature).and_return(true)
184
+ allow(Time).to receive(:now).and_return(Time.at(9_999_999_999))
185
+ result = session.authenticate(include_expired: true)
186
+ expect(result).to eq({
187
+ authenticated: false,
188
+ session_id: 'session_id',
189
+ organization_id: 'org_id',
190
+ role: 'role',
191
+ roles: ['role'],
192
+ permissions: ['read'],
193
+ feature_flags: nil,
194
+ entitlements: nil,
195
+ user: 'user',
196
+ impersonator: 'impersonator',
197
+ reason: 'INVALID_JWT',
198
+ })
199
+ end
200
+
163
201
  it 'authenticates successfully with valid session_data' do
164
202
  session = WorkOS::Session.new(
165
203
  user_management: user_management,
@@ -1693,6 +1693,81 @@ describe WorkOS::UserManagement do
1693
1693
  end
1694
1694
  end
1695
1695
 
1696
+ describe '.resend_invitation' do
1697
+ context 'with valid payload' do
1698
+ it 'resends invitation' do
1699
+ VCR.use_cassette 'user_management/resend_invitation/valid' do
1700
+ invitation = described_class.resend_invitation(
1701
+ id: 'invitation_01H5JQDV7R7ATEYZDEG0W5PRYS',
1702
+ )
1703
+
1704
+ expect(invitation.id).to eq('invitation_01H5JQDV7R7ATEYZDEG0W5PRYS')
1705
+ expect(invitation.email).to eq('test@workos.com')
1706
+ end
1707
+ end
1708
+ end
1709
+
1710
+ context 'with an invalid id' do
1711
+ it 'returns an error' do
1712
+ VCR.use_cassette 'user_management/resend_invitation/invalid' do
1713
+ expect do
1714
+ described_class.resend_invitation(
1715
+ id: 'invalid_id',
1716
+ )
1717
+ end.to raise_error(
1718
+ WorkOS::NotFoundError,
1719
+ /Invitation not found/,
1720
+ )
1721
+ end
1722
+ end
1723
+ end
1724
+
1725
+ context 'when invitation has expired' do
1726
+ it 'returns an error' do
1727
+ VCR.use_cassette 'user_management/resend_invitation/expired' do
1728
+ expect do
1729
+ described_class.resend_invitation(
1730
+ id: 'invitation_01H5JQDV7R7ATEYZDEG0W5PRYS',
1731
+ )
1732
+ end.to raise_error(
1733
+ WorkOS::InvalidRequestError,
1734
+ /Invite has expired/,
1735
+ )
1736
+ end
1737
+ end
1738
+ end
1739
+
1740
+ context 'when invitation has been revoked' do
1741
+ it 'returns an error' do
1742
+ VCR.use_cassette 'user_management/resend_invitation/revoked' do
1743
+ expect do
1744
+ described_class.resend_invitation(
1745
+ id: 'invitation_01H5JQDV7R7ATEYZDEG0W5PRYS',
1746
+ )
1747
+ end.to raise_error(
1748
+ WorkOS::InvalidRequestError,
1749
+ /Invite has been revoked/,
1750
+ )
1751
+ end
1752
+ end
1753
+ end
1754
+
1755
+ context 'when invitation has already been accepted' do
1756
+ it 'returns an error' do
1757
+ VCR.use_cassette 'user_management/resend_invitation/accepted' do
1758
+ expect do
1759
+ described_class.resend_invitation(
1760
+ id: 'invitation_01H5JQDV7R7ATEYZDEG0W5PRYS',
1761
+ )
1762
+ end.to raise_error(
1763
+ WorkOS::InvalidRequestError,
1764
+ /Invite has already been accepted/,
1765
+ )
1766
+ end
1767
+ end
1768
+ end
1769
+ end
1770
+
1696
1771
  describe '.revoke_session' do
1697
1772
  context 'with valid payload' do
1698
1773
  it 'revokes session' do
@@ -0,0 +1,83 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.workos.com/user_management/invitations/invitation_01H5JQDV7R7ATEYZDEG0W5PRYS/resend
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ User-Agent:
17
+ - WorkOS; ruby/3.0.2; arm64-darwin22; v2.16.0
18
+ Authorization:
19
+ - Bearer <API_KEY>
20
+ response:
21
+ status:
22
+ code: 400
23
+ message: Bad Request
24
+ headers:
25
+ Date:
26
+ - Mon, 17 Nov 2025 18:28:05 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Cf-Ray:
34
+ - 7fa4ef0eeafe8c12-EWR
35
+ Cf-Cache-Status:
36
+ - DYNAMIC
37
+ Etag:
38
+ - W/"56-2Auj80JGmZ1uWGCY950ud8v4KLQ"
39
+ Strict-Transport-Security:
40
+ - max-age=15552000; includeSubDomains
41
+ Vary:
42
+ - Origin, Accept-Encoding
43
+ Via:
44
+ - 1.1 spaces-router (devel)
45
+ Access-Control-Allow-Credentials:
46
+ - 'true'
47
+ Content-Security-Policy:
48
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
49
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
50
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
51
+ Expect-Ct:
52
+ - max-age=0
53
+ Referrer-Policy:
54
+ - no-referrer
55
+ X-Content-Type-Options:
56
+ - nosniff
57
+ X-Dns-Prefetch-Control:
58
+ - 'off'
59
+ X-Download-Options:
60
+ - noopen
61
+ X-Frame-Options:
62
+ - SAMEORIGIN
63
+ X-Permitted-Cross-Domain-Policies:
64
+ - none
65
+ X-Request-Id:
66
+ - f5f06564-2f73-4b73-989b-b577cfbdaa9a
67
+ X-Xss-Protection:
68
+ - '0'
69
+ Set-Cookie:
70
+ - __cf_bm=v55WlV2dq1rXkfx9668LFtglSD5c9292fFLKsviMegY-1692642485-0-AWmCDzQSIwCjWvanffzmFA5KJT/nWucOWyv7i3fyyXeH+i5iM9ZusABSbNOUR6zO2mcugNYr/TRj6ltRmm8eC3M=;
71
+ path=/; expires=Mon, 21-Aug-23 18:58:05 GMT; domain=.workos.com; HttpOnly;
72
+ Secure; SameSite=None
73
+ - __cfruid=bea6b3e4c8ea6479881eb565b1ab9a0b6deabae9-1692642485; path=/; domain=.workos.com;
74
+ HttpOnly; Secure; SameSite=None
75
+ Server:
76
+ - cloudflare
77
+ body:
78
+ encoding: ASCII-8BIT
79
+ string: '{"code":"invite_accepted","message":"Invite has already been accepted."}'
80
+ http_version:
81
+ recorded_at: Mon, 17 Nov 2025 18:28:05 GMT
82
+ recorded_with: VCR 5.0.0
83
+
@@ -0,0 +1,83 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.workos.com/user_management/invitations/invitation_01H5JQDV7R7ATEYZDEG0W5PRYS/resend
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ User-Agent:
17
+ - WorkOS; ruby/3.0.2; arm64-darwin22; v2.16.0
18
+ Authorization:
19
+ - Bearer <API_KEY>
20
+ response:
21
+ status:
22
+ code: 400
23
+ message: Bad Request
24
+ headers:
25
+ Date:
26
+ - Mon, 17 Nov 2025 18:28:05 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Cf-Ray:
34
+ - 7fa4ef0eeafe8c12-EWR
35
+ Cf-Cache-Status:
36
+ - DYNAMIC
37
+ Etag:
38
+ - W/"56-2Auj80JGmZ1uWGCY950ud8v4KLQ"
39
+ Strict-Transport-Security:
40
+ - max-age=15552000; includeSubDomains
41
+ Vary:
42
+ - Origin, Accept-Encoding
43
+ Via:
44
+ - 1.1 spaces-router (devel)
45
+ Access-Control-Allow-Credentials:
46
+ - 'true'
47
+ Content-Security-Policy:
48
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
49
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
50
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
51
+ Expect-Ct:
52
+ - max-age=0
53
+ Referrer-Policy:
54
+ - no-referrer
55
+ X-Content-Type-Options:
56
+ - nosniff
57
+ X-Dns-Prefetch-Control:
58
+ - 'off'
59
+ X-Download-Options:
60
+ - noopen
61
+ X-Frame-Options:
62
+ - SAMEORIGIN
63
+ X-Permitted-Cross-Domain-Policies:
64
+ - none
65
+ X-Request-Id:
66
+ - f5f06564-2f73-4b73-989b-b577cfbdaa9a
67
+ X-Xss-Protection:
68
+ - '0'
69
+ Set-Cookie:
70
+ - __cf_bm=v55WlV2dq1rXkfx9668LFtglSD5c9292fFLKsviMegY-1692642485-0-AWmCDzQSIwCjWvanffzmFA5KJT/nWucOWyv7i3fyyXeH+i5iM9ZusABSbNOUR6zO2mcugNYr/TRj6ltRmm8eC3M=;
71
+ path=/; expires=Mon, 21-Aug-23 18:58:05 GMT; domain=.workos.com; HttpOnly;
72
+ Secure; SameSite=None
73
+ - __cfruid=bea6b3e4c8ea6479881eb565b1ab9a0b6deabae9-1692642485; path=/; domain=.workos.com;
74
+ HttpOnly; Secure; SameSite=None
75
+ Server:
76
+ - cloudflare
77
+ body:
78
+ encoding: ASCII-8BIT
79
+ string: '{"code":"invite_expired","message":"Invite has expired."}'
80
+ http_version:
81
+ recorded_at: Mon, 17 Nov 2025 18:28:05 GMT
82
+ recorded_with: VCR 5.0.0
83
+
@@ -0,0 +1,83 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.workos.com/user_management/invitations/invalid_id/resend
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ User-Agent:
17
+ - WorkOS; ruby/3.0.2; arm64-darwin22; v2.16.0
18
+ Authorization:
19
+ - Bearer <API_KEY>
20
+ response:
21
+ status:
22
+ code: 404
23
+ message: Not Found
24
+ headers:
25
+ Date:
26
+ - Mon, 17 Nov 2025 18:28:05 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Cf-Ray:
34
+ - 7fa4ef0eeafe8c12-EWR
35
+ Cf-Cache-Status:
36
+ - DYNAMIC
37
+ Etag:
38
+ - W/"56-2Auj80JGmZ1uWGCY950ud8v4KLQ"
39
+ Strict-Transport-Security:
40
+ - max-age=15552000; includeSubDomains
41
+ Vary:
42
+ - Origin, Accept-Encoding
43
+ Via:
44
+ - 1.1 spaces-router (devel)
45
+ Access-Control-Allow-Credentials:
46
+ - 'true'
47
+ Content-Security-Policy:
48
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
49
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
50
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
51
+ Expect-Ct:
52
+ - max-age=0
53
+ Referrer-Policy:
54
+ - no-referrer
55
+ X-Content-Type-Options:
56
+ - nosniff
57
+ X-Dns-Prefetch-Control:
58
+ - 'off'
59
+ X-Download-Options:
60
+ - noopen
61
+ X-Frame-Options:
62
+ - SAMEORIGIN
63
+ X-Permitted-Cross-Domain-Policies:
64
+ - none
65
+ X-Request-Id:
66
+ - f5f06564-2f73-4b73-989b-b577cfbdaa9a
67
+ X-Xss-Protection:
68
+ - '0'
69
+ Set-Cookie:
70
+ - __cf_bm=v55WlV2dq1rXkfx9668LFtglSD5c9292fFLKsviMegY-1692642485-0-AWmCDzQSIwCjWvanffzmFA5KJT/nWucOWyv7i3fyyXeH+i5iM9ZusABSbNOUR6zO2mcugNYr/TRj6ltRmm8eC3M=;
71
+ path=/; expires=Mon, 21-Aug-23 18:58:05 GMT; domain=.workos.com; HttpOnly;
72
+ Secure; SameSite=None
73
+ - __cfruid=bea6b3e4c8ea6479881eb565b1ab9a0b6deabae9-1692642485; path=/; domain=.workos.com;
74
+ HttpOnly; Secure; SameSite=None
75
+ Server:
76
+ - cloudflare
77
+ body:
78
+ encoding: ASCII-8BIT
79
+ string: '{"message":"Invitation not found: ''invalid_id''.","code":"entity_not_found","entity_id":"bad_id"}'
80
+ http_version:
81
+ recorded_at: Mon, 17 Nov 2025 18:28:05 GMT
82
+ recorded_with: VCR 5.0.0
83
+
@@ -0,0 +1,83 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.workos.com/user_management/invitations/invitation_01H5JQDV7R7ATEYZDEG0W5PRYS/resend
6
+ body:
7
+ encoding: UTF-8
8
+ string: ''
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ User-Agent:
17
+ - WorkOS; ruby/3.0.2; arm64-darwin22; v2.16.0
18
+ Authorization:
19
+ - Bearer <API_KEY>
20
+ response:
21
+ status:
22
+ code: 400
23
+ message: Bad Request
24
+ headers:
25
+ Date:
26
+ - Mon, 17 Nov 2025 18:28:05 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Transfer-Encoding:
30
+ - chunked
31
+ Connection:
32
+ - keep-alive
33
+ Cf-Ray:
34
+ - 7fa4ef0eeafe8c12-EWR
35
+ Cf-Cache-Status:
36
+ - DYNAMIC
37
+ Etag:
38
+ - W/"56-2Auj80JGmZ1uWGCY950ud8v4KLQ"
39
+ Strict-Transport-Security:
40
+ - max-age=15552000; includeSubDomains
41
+ Vary:
42
+ - Origin, Accept-Encoding
43
+ Via:
44
+ - 1.1 spaces-router (devel)
45
+ Access-Control-Allow-Credentials:
46
+ - 'true'
47
+ Content-Security-Policy:
48
+ - 'default-src ''self'';base-uri ''self'';block-all-mixed-content;font-src ''self''
49
+ https: data:;frame-ancestors ''self'';img-src ''self'' data:;object-src ''none'';script-src
50
+ ''self'';script-src-attr ''none'';style-src ''self'' https: ''unsafe-inline'';upgrade-insecure-requests'
51
+ Expect-Ct:
52
+ - max-age=0
53
+ Referrer-Policy:
54
+ - no-referrer
55
+ X-Content-Type-Options:
56
+ - nosniff
57
+ X-Dns-Prefetch-Control:
58
+ - 'off'
59
+ X-Download-Options:
60
+ - noopen
61
+ X-Frame-Options:
62
+ - SAMEORIGIN
63
+ X-Permitted-Cross-Domain-Policies:
64
+ - none
65
+ X-Request-Id:
66
+ - f5f06564-2f73-4b73-989b-b577cfbdaa9a
67
+ X-Xss-Protection:
68
+ - '0'
69
+ Set-Cookie:
70
+ - __cf_bm=v55WlV2dq1rXkfx9668LFtglSD5c9292fFLKsviMegY-1692642485-0-AWmCDzQSIwCjWvanffzmFA5KJT/nWucOWyv7i3fyyXeH+i5iM9ZusABSbNOUR6zO2mcugNYr/TRj6ltRmm8eC3M=;
71
+ path=/; expires=Mon, 21-Aug-23 18:58:05 GMT; domain=.workos.com; HttpOnly;
72
+ Secure; SameSite=None
73
+ - __cfruid=bea6b3e4c8ea6479881eb565b1ab9a0b6deabae9-1692642485; path=/; domain=.workos.com;
74
+ HttpOnly; Secure; SameSite=None
75
+ Server:
76
+ - cloudflare
77
+ body:
78
+ encoding: ASCII-8BIT
79
+ string: '{"code":"invite_revoked","message":"Invite has been revoked."}'
80
+ http_version:
81
+ recorded_at: Mon, 17 Nov 2025 18:28:05 GMT
82
+ recorded_with: VCR 5.0.0
83
+
@@ -0,0 +1,83 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://api.workos.com/user_management/invitations/invitation_01H5JQDV7R7ATEYZDEG0W5PRYS/resend
6
+ body:
7
+ encoding: UTF-8
8
+ string: ""
9
+ headers:
10
+ Content-Type:
11
+ - application/json
12
+ Accept-Encoding:
13
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
14
+ Accept:
15
+ - "*/*"
16
+ User-Agent:
17
+ - WorkOS; ruby/3.0.2; arm64-darwin21; v2.16.0
18
+ Authorization:
19
+ - Bearer <API_KEY>
20
+ response:
21
+ status:
22
+ code: 200
23
+ message: OK
24
+ headers:
25
+ Date:
26
+ - Mon, 17 Nov 2025 18:28:05 GMT
27
+ Content-Type:
28
+ - application/json; charset=utf-8
29
+ Content-Length:
30
+ - "376"
31
+ Connection:
32
+ - keep-alive
33
+ Cf-Ray:
34
+ - 7ff6b9122b60f8dd-SEA
35
+ Cf-Cache-Status:
36
+ - DYNAMIC
37
+ Etag:
38
+ - W/"178-SVaSEtrIczZQlwnTK57+aDrxt/g"
39
+ Strict-Transport-Security:
40
+ - max-age=15552000; includeSubDomains
41
+ Vary:
42
+ - Origin, Accept-Encoding
43
+ Via:
44
+ - 1.1 spaces-router (devel)
45
+ Access-Control-Allow-Credentials:
46
+ - "true"
47
+ Content-Security-Policy:
48
+ - "default-src 'self';base-uri 'self';block-all-mixed-content;font-src 'self'
49
+ https: data:;frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src
50
+ 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"
51
+ Expect-Ct:
52
+ - max-age=0
53
+ Referrer-Policy:
54
+ - no-referrer
55
+ X-Content-Type-Options:
56
+ - nosniff
57
+ X-Dns-Prefetch-Control:
58
+ - "off"
59
+ X-Download-Options:
60
+ - noopen
61
+ X-Frame-Options:
62
+ - SAMEORIGIN
63
+ X-Permitted-Cross-Domain-Policies:
64
+ - none
65
+ X-Request-Id:
66
+ - df30b890-b6d9-494f-b59c-317e85b5b5f0
67
+ X-Xss-Protection:
68
+ - "0"
69
+ Set-Cookie:
70
+ - __cf_bm=9k_hHql8o3VCr_ugrzhVkuvFJBIFO5rLKq88Tg1FQzI-1693500106-0-AWUpQpsgsfMWdRySOy7cT3NmqbANvylwBZn7ontxTsDKPijdiGDVMsPih2HAbK3+ldKDe9A1Ul6Mf2+9mfyLrjQ=;
71
+ path=/; expires=Thu, 31-Aug-23 17:11:46 GMT; domain=.workos.com; HttpOnly;
72
+ Secure; SameSite=None
73
+ - __cfruid=40a4c5b06423ba61b4c78144e7e0eddc58e13ff4-1693500106; path=/; domain=.workos.com;
74
+ HttpOnly; Secure; SameSite=None
75
+ Server:
76
+ - cloudflare
77
+ body:
78
+ encoding: UTF-8
79
+ string: '{"object":"invitation","id":"invitation_01H5JQDV7R7ATEYZDEG0W5PRYS","email":"test@workos.com","state":"pending","accepted_at":null,"revoked_at":null,"expires_at":"2023-07-25T02:07:19.911Z","organization_id":"org_01H5JQDV7R7ATEYZDEG0W5PRYS","token":"Z1uX3RbwcIl5fIGJJJCXXisdI","accept_invitation_url":"https://myauthkit.com/invite?invitation_token=Z1uX3RbwcIl5fIGJJJCXXisdI","created_at":"2023-07-18T02:07:19.911Z","updated_at":"2023-07-18T02:07:19.911Z"}'
80
+ http_version:
81
+ recorded_at: Mon, 17 Nov 2025 18:28:05 GMT
82
+ recorded_with: VCR 5.0.0
83
+
@@ -76,7 +76,7 @@ http_interactions:
76
76
  - cloudflare
77
77
  body:
78
78
  encoding: UTF-8
79
- string: '{"object":"user","id":"user_01H7WRJBPAAHX1BYRQHEK7QC4A","email":"lucy.lawless@example.com","first_name":"Lucy","last_name":"Lawless","created_at":"2023-08-15T14:11:04.519Z","updated_at":"2023-08-22T20:34:49.277Z","email_verified":false}'
79
+ string: '{"user":{"object":"user","id":"user_01H7WRJBPAAHX1BYRQHEK7QC4A","email":"lucy.lawless@example.com","first_name":"Lucy","last_name":"Lawless","created_at":"2023-08-15T14:11:04.519Z","updated_at":"2023-08-22T20:34:49.277Z","email_verified":false}}'
80
80
  http_version:
81
81
  recorded_at: Tue, 22 Aug 2023 20:35:40 GMT
82
82
  recorded_with: VCR 5.0.0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workos
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.27.0
4
+ version: 5.29.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - WorkOS
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-27 00:00:00.000000000 Z
11
+ date: 2025-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: encryptor
@@ -363,6 +363,11 @@ files:
363
363
  - spec/support/fixtures/vcr_cassettes/user_management/list_users/no_options.yml
364
364
  - spec/support/fixtures/vcr_cassettes/user_management/list_users/with_options.yml
365
365
  - spec/support/fixtures/vcr_cassettes/user_management/reactivate_organization_membership.yml
366
+ - spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/accepted.yml
367
+ - spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/expired.yml
368
+ - spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/invalid.yml
369
+ - spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/revoked.yml
370
+ - spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/valid.yml
366
371
  - spec/support/fixtures/vcr_cassettes/user_management/reset_password/invalid.yml
367
372
  - spec/support/fixtures/vcr_cassettes/user_management/reset_password/valid.yml
368
373
  - spec/support/fixtures/vcr_cassettes/user_management/revoke_invitation/invalid.yml
@@ -597,6 +602,11 @@ test_files:
597
602
  - spec/support/fixtures/vcr_cassettes/user_management/list_users/no_options.yml
598
603
  - spec/support/fixtures/vcr_cassettes/user_management/list_users/with_options.yml
599
604
  - spec/support/fixtures/vcr_cassettes/user_management/reactivate_organization_membership.yml
605
+ - spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/accepted.yml
606
+ - spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/expired.yml
607
+ - spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/invalid.yml
608
+ - spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/revoked.yml
609
+ - spec/support/fixtures/vcr_cassettes/user_management/resend_invitation/valid.yml
600
610
  - spec/support/fixtures/vcr_cassettes/user_management/reset_password/invalid.yml
601
611
  - spec/support/fixtures/vcr_cassettes/user_management/reset_password/valid.yml
602
612
  - spec/support/fixtures/vcr_cassettes/user_management/revoke_invitation/invalid.yml