Skip to content

Commit 3c27509

Browse files
authored
fixes turbolinks race condition and changes port since 3035 is often what Node runs on (#71)
1 parent 28cd675 commit 3c27509

File tree

5 files changed

+108
-114
lines changed

5 files changed

+108
-114
lines changed

ruby-rails-sso-example/Gemfile

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ gem 'webpacker', '~> 4.0'
1717
gem 'turbolinks', '~> 5'
1818
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
1919
gem 'jbuilder', '~> 2.7'
20-
gem 'pry'
2120
gem "sprockets-rails"
2221
gem "net-http"
2322
gem "foreman"

ruby-rails-sso-example/Gemfile.lock

+102-106
Original file line numberDiff line numberDiff line change
@@ -1,86 +1,86 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actioncable (7.0.3.1)
5-
actionpack (= 7.0.3.1)
6-
activesupport (= 7.0.3.1)
4+
actioncable (7.0.4.2)
5+
actionpack (= 7.0.4.2)
6+
activesupport (= 7.0.4.2)
77
nio4r (~> 2.0)
88
websocket-driver (>= 0.6.1)
9-
actionmailbox (7.0.3.1)
10-
actionpack (= 7.0.3.1)
11-
activejob (= 7.0.3.1)
12-
activerecord (= 7.0.3.1)
13-
activestorage (= 7.0.3.1)
14-
activesupport (= 7.0.3.1)
9+
actionmailbox (7.0.4.2)
10+
actionpack (= 7.0.4.2)
11+
activejob (= 7.0.4.2)
12+
activerecord (= 7.0.4.2)
13+
activestorage (= 7.0.4.2)
14+
activesupport (= 7.0.4.2)
1515
mail (>= 2.7.1)
1616
net-imap
1717
net-pop
1818
net-smtp
19-
actionmailer (7.0.3.1)
20-
actionpack (= 7.0.3.1)
21-
actionview (= 7.0.3.1)
22-
activejob (= 7.0.3.1)
23-
activesupport (= 7.0.3.1)
19+
actionmailer (7.0.4.2)
20+
actionpack (= 7.0.4.2)
21+
actionview (= 7.0.4.2)
22+
activejob (= 7.0.4.2)
23+
activesupport (= 7.0.4.2)
2424
mail (~> 2.5, >= 2.5.4)
2525
net-imap
2626
net-pop
2727
net-smtp
2828
rails-dom-testing (~> 2.0)
29-
actionpack (7.0.3.1)
30-
actionview (= 7.0.3.1)
31-
activesupport (= 7.0.3.1)
29+
actionpack (7.0.4.2)
30+
actionview (= 7.0.4.2)
31+
activesupport (= 7.0.4.2)
3232
rack (~> 2.0, >= 2.2.0)
3333
rack-test (>= 0.6.3)
3434
rails-dom-testing (~> 2.0)
3535
rails-html-sanitizer (~> 1.0, >= 1.2.0)
36-
actiontext (7.0.3.1)
37-
actionpack (= 7.0.3.1)
38-
activerecord (= 7.0.3.1)
39-
activestorage (= 7.0.3.1)
40-
activesupport (= 7.0.3.1)
36+
actiontext (7.0.4.2)
37+
actionpack (= 7.0.4.2)
38+
activerecord (= 7.0.4.2)
39+
activestorage (= 7.0.4.2)
40+
activesupport (= 7.0.4.2)
4141
globalid (>= 0.6.0)
4242
nokogiri (>= 1.8.5)
43-
actionview (7.0.3.1)
44-
activesupport (= 7.0.3.1)
43+
actionview (7.0.4.2)
44+
activesupport (= 7.0.4.2)
4545
builder (~> 3.1)
4646
erubi (~> 1.4)
4747
rails-dom-testing (~> 2.0)
4848
rails-html-sanitizer (~> 1.1, >= 1.2.0)
49-
activejob (7.0.3.1)
50-
activesupport (= 7.0.3.1)
49+
activejob (7.0.4.2)
50+
activesupport (= 7.0.4.2)
5151
globalid (>= 0.3.6)
52-
activemodel (7.0.3.1)
53-
activesupport (= 7.0.3.1)
54-
activerecord (7.0.3.1)
55-
activemodel (= 7.0.3.1)
56-
activesupport (= 7.0.3.1)
57-
activestorage (7.0.3.1)
58-
actionpack (= 7.0.3.1)
59-
activejob (= 7.0.3.1)
60-
activerecord (= 7.0.3.1)
61-
activesupport (= 7.0.3.1)
52+
activemodel (7.0.4.2)
53+
activesupport (= 7.0.4.2)
54+
activerecord (7.0.4.2)
55+
activemodel (= 7.0.4.2)
56+
activesupport (= 7.0.4.2)
57+
activestorage (7.0.4.2)
58+
actionpack (= 7.0.4.2)
59+
activejob (= 7.0.4.2)
60+
activerecord (= 7.0.4.2)
61+
activesupport (= 7.0.4.2)
6262
marcel (~> 1.0)
6363
mini_mime (>= 1.1.0)
64-
activesupport (7.0.3.1)
64+
activesupport (7.0.4.2)
6565
concurrent-ruby (~> 1.0, >= 1.0.2)
6666
i18n (>= 1.6, < 2)
6767
minitest (>= 5.1)
6868
tzinfo (~> 2.0)
69-
addressable (2.8.0)
70-
public_suffix (>= 2.0.2, < 5.0)
69+
addressable (2.8.1)
70+
public_suffix (>= 2.0.2, < 6.0)
7171
autoprefixer-rails (10.4.7.0)
7272
execjs (~> 2)
7373
bcrypt (3.1.18)
7474
bindex (0.8.1)
75-
bootsnap (1.13.0)
75+
bootsnap (1.16.0)
7676
msgpack (~> 1.2)
7777
bootstrap (5.1.3)
7878
autoprefixer-rails (>= 9.1.0)
7979
popper_js (>= 2.9.3, < 3)
8080
sassc-rails (>= 2.0.0)
8181
builder (3.2.4)
8282
byebug (11.1.3)
83-
capybara (3.37.1)
83+
capybara (3.38.0)
8484
addressable
8585
matrix
8686
mini_mime (>= 0.1.3)
@@ -89,112 +89,109 @@ GEM
8989
rack-test (>= 0.6.3)
9090
regexp_parser (>= 1.5, < 3.0)
9191
xpath (~> 3.2)
92-
childprocess (4.1.0)
9392
coderay (1.1.3)
94-
concurrent-ruby (1.1.10)
93+
concurrent-ruby (1.2.0)
9594
crass (1.0.6)
95+
date (3.3.3)
9696
devise (4.8.1)
9797
bcrypt (~> 3.0)
9898
orm_adapter (~> 0.1)
9999
railties (>= 4.1.0)
100100
responders
101101
warden (~> 1.2.3)
102-
digest (3.1.0)
103-
erubi (1.11.0)
102+
erubi (1.12.0)
104103
execjs (2.8.1)
105104
ffi (1.15.5)
106105
foreman (0.87.2)
107-
globalid (1.0.0)
106+
globalid (1.1.0)
108107
activesupport (>= 5.0)
109108
i18n (1.12.0)
110109
concurrent-ruby (~> 1.0)
111110
jbuilder (2.11.5)
112111
actionview (>= 5.0.0)
113112
activesupport (>= 5.0.0)
114-
json (2.6.2)
115-
listen (3.7.1)
113+
json (2.6.3)
114+
listen (3.8.0)
116115
rb-fsevent (~> 0.10, >= 0.10.3)
117116
rb-inotify (~> 0.9, >= 0.9.10)
118-
loofah (2.18.0)
117+
loofah (2.19.1)
119118
crass (~> 1.0.2)
120119
nokogiri (>= 1.5.9)
121-
mail (2.7.1)
120+
mail (2.8.1)
122121
mini_mime (>= 0.1.1)
122+
net-imap
123+
net-pop
124+
net-smtp
123125
marcel (1.0.2)
124126
matrix (0.4.2)
125127
method_source (1.0.0)
126128
mini_mime (1.1.2)
127-
mini_portile2 (2.8.0)
128-
minitest (5.16.2)
129-
msgpack (1.5.4)
130-
net-http (0.2.2)
129+
mini_portile2 (2.8.1)
130+
minitest (5.17.0)
131+
msgpack (1.6.0)
132+
net-http (0.3.2)
131133
uri
132-
net-imap (0.2.3)
133-
digest
134+
net-imap (0.3.4)
135+
date
134136
net-protocol
135-
strscan
136-
net-pop (0.1.1)
137-
digest
137+
net-pop (0.1.2)
138138
net-protocol
139+
net-protocol (0.2.1)
139140
timeout
140-
net-protocol (0.1.3)
141-
timeout
142-
net-smtp (0.3.1)
143-
digest
141+
net-smtp (0.3.3)
144142
net-protocol
145-
timeout
146143
nio4r (2.5.8)
147-
nokogiri (1.13.8)
144+
nokogiri (1.14.2)
148145
mini_portile2 (~> 2.8.0)
149146
racc (~> 1.4)
150147
orm_adapter (0.5.0)
151-
popper_js (2.11.5)
152-
pry (0.14.1)
148+
popper_js (2.11.6)
149+
pry (0.14.2)
153150
coderay (~> 1.1)
154151
method_source (~> 1.0)
155-
public_suffix (4.0.7)
152+
public_suffix (5.0.1)
156153
puma (4.3.12)
157154
nio4r (~> 2.0)
158-
racc (1.6.0)
159-
rack (2.2.4)
160-
rack-proxy (0.7.2)
155+
racc (1.6.2)
156+
rack (2.2.6.2)
157+
rack-proxy (0.7.6)
161158
rack
162159
rack-test (2.0.2)
163160
rack (>= 1.3)
164-
rails (7.0.3.1)
165-
actioncable (= 7.0.3.1)
166-
actionmailbox (= 7.0.3.1)
167-
actionmailer (= 7.0.3.1)
168-
actionpack (= 7.0.3.1)
169-
actiontext (= 7.0.3.1)
170-
actionview (= 7.0.3.1)
171-
activejob (= 7.0.3.1)
172-
activemodel (= 7.0.3.1)
173-
activerecord (= 7.0.3.1)
174-
activestorage (= 7.0.3.1)
175-
activesupport (= 7.0.3.1)
161+
rails (7.0.4.2)
162+
actioncable (= 7.0.4.2)
163+
actionmailbox (= 7.0.4.2)
164+
actionmailer (= 7.0.4.2)
165+
actionpack (= 7.0.4.2)
166+
actiontext (= 7.0.4.2)
167+
actionview (= 7.0.4.2)
168+
activejob (= 7.0.4.2)
169+
activemodel (= 7.0.4.2)
170+
activerecord (= 7.0.4.2)
171+
activestorage (= 7.0.4.2)
172+
activesupport (= 7.0.4.2)
176173
bundler (>= 1.15.0)
177-
railties (= 7.0.3.1)
174+
railties (= 7.0.4.2)
178175
rails-dom-testing (2.0.3)
179176
activesupport (>= 4.2.0)
180177
nokogiri (>= 1.6)
181-
rails-html-sanitizer (1.4.3)
182-
loofah (~> 2.3)
183-
railties (7.0.3.1)
184-
actionpack (= 7.0.3.1)
185-
activesupport (= 7.0.3.1)
178+
rails-html-sanitizer (1.5.0)
179+
loofah (~> 2.19, >= 2.19.1)
180+
railties (7.0.4.2)
181+
actionpack (= 7.0.4.2)
182+
activesupport (= 7.0.4.2)
186183
method_source
187184
rake (>= 12.2)
188185
thor (~> 1.0)
189186
zeitwerk (~> 2.5)
190187
rake (13.0.6)
191-
rb-fsevent (0.11.1)
188+
rb-fsevent (0.11.2)
192189
rb-inotify (0.10.1)
193190
ffi (~> 1.0)
194-
regexp_parser (2.5.0)
195-
responders (3.0.1)
196-
actionpack (>= 5.0)
197-
railties (>= 5.0)
191+
regexp_parser (2.7.0)
192+
responders (3.1.0)
193+
actionpack (>= 5.2)
194+
railties (>= 5.2)
198195
rexml (3.2.5)
199196
rubyzip (2.3.2)
200197
sass-rails (6.0.0)
@@ -207,42 +204,41 @@ GEM
207204
sprockets (> 3.0)
208205
sprockets-rails
209206
tilt
210-
selenium-webdriver (4.4.0)
211-
childprocess (>= 0.5, < 5.0)
207+
selenium-webdriver (4.8.0)
212208
rexml (~> 3.2, >= 3.2.5)
213209
rubyzip (>= 1.2.2, < 3.0)
214210
websocket (~> 1.0)
215-
sorbet-runtime (0.5.10326)
211+
sorbet-runtime (0.5.10667)
216212
spring (2.1.1)
217213
spring-watcher-listen (2.0.1)
218214
listen (>= 2.7, < 4.0)
219215
spring (>= 1.2, < 3.0)
220-
sprockets (4.1.1)
216+
sprockets (4.2.0)
221217
concurrent-ruby (~> 1.0)
222-
rack (> 1, < 3)
218+
rack (>= 2.2.4, < 4)
223219
sprockets-rails (3.4.2)
224220
actionpack (>= 5.2)
225221
activesupport (>= 5.2)
226222
sprockets (>= 3.0.0)
227-
sqlite3 (1.4.4)
228-
strscan (3.0.4)
223+
sqlite3 (1.6.0)
224+
mini_portile2 (~> 2.8.0)
229225
thor (1.2.1)
230226
tilt (2.0.11)
231-
timeout (0.3.0)
227+
timeout (0.3.2)
232228
turbolinks (5.2.1)
233229
turbolinks-source (~> 5.2)
234230
turbolinks-source (5.2.0)
235-
tzinfo (2.0.5)
231+
tzinfo (2.0.6)
236232
concurrent-ruby (~> 1.0)
237-
uri (0.11.0)
233+
uri (0.12.0)
238234
warden (1.2.9)
239235
rack (>= 2.0.9)
240236
web-console (4.2.0)
241237
actionview (>= 6.0.0)
242238
activemodel (>= 6.0.0)
243239
bindex (>= 0.4.0)
244240
railties (>= 6.0.0)
245-
webdrivers (5.0.0)
241+
webdrivers (5.2.0)
246242
nokogiri (~> 1.6)
247243
rubyzip (>= 1.3.0)
248244
selenium-webdriver (~> 4.0)
@@ -258,7 +254,7 @@ GEM
258254
sorbet-runtime (~> 0.5)
259255
xpath (3.2.0)
260256
nokogiri (~> 1.8)
261-
zeitwerk (2.6.0)
257+
zeitwerk (2.6.7)
262258

263259
PLATFORMS
264260
-darwin-21

ruby-rails-sso-example/app/controllers/users/sessions_controller.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class Users::SessionsController < Devise::SessionsController
66
CLIENT_ID = ENV['WORKOS_CLIENT_ID']
77

88
# Set the Connection ID that you want to test
9-
CONNECTION_ID = 'conn_01FHQ0G8Q6WTP0YT1E3CVNQD6V'
9+
CONNECTION_ID = 'CHANGE TO YOUR CONNECTION'
1010

1111
# GET /sso/new path to authenticate via WorkOS
1212
# You can also use connection or provider parameters

ruby-rails-sso-example/app/javascript/packs/application.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// that code so it'll be compiled.
55

66
require("@rails/ujs").start()
7-
require("turbolinks").start()
7+
// require("turbolinks").start()
88
require("@rails/activestorage").start()
99
require("channels")
1010

0 commit comments

Comments
 (0)