workos 5.23.0 → 5.24.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: 840052dd55f646d6ae09f2c0e0a4c91a6686d0f4fcb3b9da66b13fa3e4f835eb
4
- data.tar.gz: cb5807f1a8b0b1fe28f21e5c8cfa84fd3c75e68bf7e743f9f95a5ac1787efd55
3
+ metadata.gz: d7f42db282e0cd23cad458937055c17ec9fa9e82672b9aa1b888ce2200aa8891
4
+ data.tar.gz: 1e05a96b056eba6bef1e8f89d7ad6b2cabba616b3911c2afccee6133e8749b9f
5
5
  SHA512:
6
- metadata.gz: fccea79a69343e4deeb1f25e076dfc19febbd5a540bd0e9e55ad6f4859ef3332a300e1f023e74c8bad7c16fe1c2b7266eb8bc5dfd600ddb0d40e036ff48d739f
7
- data.tar.gz: b49a2c19e2360811203f8b07806a198bd7b9307dc654b72fb266311ff7fbf881b0cb142159a67144c25057d340e3d4fdd11bba1fc42e509bf05fcf427dcd9a48
6
+ metadata.gz: 1f3282f8a5c632f2f03a98ce2c43824cfe2fbbb57b575ee51def000a5b03073b1ab284368f55543a79e3281223b6409854fdb98a45457b17268f9768a7717957
7
+ data.tar.gz: dbf3dd84bc9758fd141649e1dbb5c7d41fc06b6d5e8e64d1ae597e8188a87369783ecdae026c7b6a6f947afbc28c25fd475aa8f927cb422feb6766c6ddfa0804
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- workos (5.23.0)
4
+ workos (5.24.0)
5
5
  encryptor (~> 3.0)
6
6
  jwt (~> 2.8)
7
7
 
@@ -32,7 +32,6 @@ GEM
32
32
  rainbow (3.1.1)
33
33
  regexp_parser (2.10.0)
34
34
  rexml (3.4.1)
35
- strscan
36
35
  rspec (3.9.0)
37
36
  rspec-core (~> 3.9.0)
38
37
  rspec-expectations (~> 3.9.0)
@@ -59,11 +58,11 @@ GEM
59
58
  rubocop-ast (1.37.0)
60
59
  parser (>= 3.3.1.0)
61
60
  ruby-progressbar (1.13.0)
62
- strscan (3.1.0)
63
61
  unicode-display_width (3.1.4)
64
62
  unicode-emoji (~> 4.0, >= 4.0.4)
65
63
  unicode-emoji (4.0.4)
66
- vcr (5.0.0)
64
+ vcr (6.3.1)
65
+ base64
67
66
  webmock (3.23.0)
68
67
  addressable (>= 2.8.0)
69
68
  crack (>= 0.3.2)
@@ -76,7 +75,7 @@ DEPENDENCIES
76
75
  bundler (>= 2.0.1)
77
76
  rspec (~> 3.9.0)
78
77
  rubocop (~> 1.71)
79
- vcr (~> 5.0.0)
78
+ vcr (~> 6.0)
80
79
  webmock
81
80
  workos!
82
81
 
@@ -69,6 +69,8 @@ module WorkOS
69
69
  # that is preserved and available to the client in the response.
70
70
  # @param [String] login_hint Can be used to pre-fill the username/email address
71
71
  # field of the IdP sign-in page for the user, if you know their username ahead of time.
72
+ # @param [String] screen_hint Specify which AuthKit screen users should land on upon redirection
73
+ # (Only applicable when provider is 'authkit').
72
74
  # @param [String] domain_hint Can be used to pre-fill the domain field when
73
75
  # initiating authentication with Microsoft OAuth, or with a GoogleSAML connection type.
74
76
  # @param [Array<String>] provider_scopes An array of additional OAuth scopes to request from the provider.
@@ -94,6 +96,7 @@ module WorkOS
94
96
  client_id: nil,
95
97
  domain_hint: nil,
96
98
  login_hint: nil,
99
+ screen_hint: nil,
97
100
  provider: nil,
98
101
  connection_id: nil,
99
102
  organization_id: nil,
@@ -114,6 +117,7 @@ module WorkOS
114
117
  state: state,
115
118
  domain_hint: domain_hint,
116
119
  login_hint: login_hint,
120
+ screen_hint: screen_hint,
117
121
  provider: provider,
118
122
  connection_id: connection_id,
119
123
  organization_id: organization_id,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WorkOS
4
- VERSION = '5.23.0'
4
+ VERSION = '5.24.0'
5
5
  end
@@ -202,6 +202,41 @@ describe WorkOS::UserManagement do
202
202
  end
203
203
  end
204
204
 
205
+ context 'with a screen hint' do
206
+ let(:args) do
207
+ {
208
+ provider: 'authkit',
209
+ screen_hint: 'sign_up',
210
+ client_id: 'workos-proj-123',
211
+ redirect_uri: 'foo.com/auth/callback',
212
+ state: {
213
+ next_page: '/dashboard/edit',
214
+ }.to_s,
215
+ }
216
+ end
217
+ it 'returns a valid URL' do
218
+ authorization_url = described_class.authorization_url(**args)
219
+
220
+ expect(URI.parse(authorization_url)).to be_a URI
221
+ end
222
+
223
+ it 'returns the expected hostname' do
224
+ authorization_url = described_class.authorization_url(**args)
225
+
226
+ expect(URI.parse(authorization_url).host).to eq(WorkOS.config.api_hostname)
227
+ end
228
+
229
+ it 'returns the expected query string' do
230
+ authorization_url = described_class.authorization_url(**args)
231
+
232
+ expect(URI.parse(authorization_url).query).to eq(
233
+ 'client_id=workos-proj-123&redirect_uri=foo.com%2Fauth%2Fcallback' \
234
+ '&response_type=code&state=%7B%3Anext_page%3D%3E%22%2Fdashboard%2F' \
235
+ 'edit%22%7D&screen_hint=sign_up&provider=authkit',
236
+ )
237
+ end
238
+ end
239
+
205
240
  context 'with neither connection_id, organization_id or provider' do
206
241
  let(:args) do
207
242
  {
data/workos.gemspec CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency 'bundler', '>= 2.0.1'
28
28
  spec.add_development_dependency 'rspec', '~> 3.9.0'
29
29
  spec.add_development_dependency 'rubocop', '~> 1.71'
30
- spec.add_development_dependency 'vcr', '~> 5.0.0'
30
+ spec.add_development_dependency 'vcr', '~> 6.0'
31
31
  spec.add_development_dependency 'webmock'
32
32
 
33
33
  spec.required_ruby_version = '>= 3.1'
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.23.0
4
+ version: 5.24.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-07-23 00:00:00.000000000 Z
11
+ date: 2025-07-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: encryptor
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 5.0.0
89
+ version: '6.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 5.0.0
96
+ version: '6.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: webmock
99
99
  requirement: !ruby/object:Gem::Requirement