descope 1.0.4 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yaml +15 -27
  3. data/.github/workflows/publish-gem.yaml +61 -0
  4. data/Gemfile +12 -14
  5. data/Gemfile.lock +46 -101
  6. data/README.md +56 -19
  7. data/descope.gemspec +25 -20
  8. data/examples/ruby/.ruby-version +1 -0
  9. data/examples/ruby/access_key_app.rb +7 -4
  10. data/examples/ruby/enchantedlink_app.rb +1 -0
  11. data/examples/ruby/magiclink_app.rb +1 -0
  12. data/examples/ruby/management/.ruby-version +1 -0
  13. data/examples/ruby/management/Gemfile +2 -2
  14. data/examples/ruby/management/Gemfile.lock +2 -2
  15. data/examples/ruby/management/access_key_app.rb +2 -0
  16. data/examples/ruby/management/audit_app.rb +32 -8
  17. data/examples/ruby/management/authz_app.rb +1 -0
  18. data/examples/ruby/management/flow_app.rb +1 -0
  19. data/examples/ruby/management/permission_app.rb +3 -2
  20. data/examples/ruby/management/role_app.rb +10 -4
  21. data/examples/ruby/management/tenant_app.rb +1 -0
  22. data/examples/ruby/management/user_app.rb +1 -0
  23. data/examples/ruby/oauth_app.rb +1 -0
  24. data/examples/ruby/otp_app.rb +38 -12
  25. data/examples/ruby/password_app.rb +8 -7
  26. data/examples/ruby/saml_app.rb +1 -0
  27. data/examples/ruby/version_check.rb +17 -0
  28. data/examples/ruby-on-rails-api/descope/.gitignore +58 -28
  29. data/examples/ruby-on-rails-api/descope/Gemfile +3 -1
  30. data/examples/ruby-on-rails-api/descope/Gemfile.lock +121 -90
  31. data/examples/ruby-on-rails-api/descope/README.md +18 -18
  32. data/examples/ruby-on-rails-api/descope/app/assets/builds/App.css +62 -0
  33. data/examples/ruby-on-rails-api/descope/app/assets/builds/App.css.map +7 -0
  34. data/examples/ruby-on-rails-api/descope/app/assets/builds/application.css +20131 -0
  35. data/examples/ruby-on-rails-api/descope/app/assets/builds/application.css.map +7 -0
  36. data/examples/ruby-on-rails-api/descope/app/assets/builds/application.js +40368 -0
  37. data/examples/ruby-on-rails-api/descope/app/assets/builds/application.js.map +7 -0
  38. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/App.css +62 -0
  39. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/App.css.map +7 -0
  40. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/App.js +27979 -0
  41. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/App.js.map +7 -0
  42. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Dashboard.css +62 -0
  43. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Dashboard.css.map +7 -0
  44. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Dashboard.js +27118 -0
  45. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Dashboard.js.map +7 -0
  46. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Home.css +62 -0
  47. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Home.css.map +7 -0
  48. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Home.js +27113 -0
  49. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Home.js.map +7 -0
  50. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Login.css +62 -0
  51. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Login.css.map +7 -0
  52. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Login.js +27131 -0
  53. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Login.js.map +7 -0
  54. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Profile.css +62 -0
  55. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Profile.css.map +7 -0
  56. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Profile.js +27168 -0
  57. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/Profile.js.map +7 -0
  58. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/index.css +62 -0
  59. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/index.css.map +7 -0
  60. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/index.js +28236 -0
  61. data/examples/ruby-on-rails-api/descope/app/assets/builds/components/index.js.map +7 -0
  62. data/examples/ruby-on-rails-api/descope/app/assets/builds/controllers/application.js +2456 -0
  63. data/examples/ruby-on-rails-api/descope/app/assets/builds/controllers/application.js.map +7 -0
  64. data/examples/ruby-on-rails-api/descope/app/assets/builds/controllers/index.js +2453 -0
  65. data/examples/ruby-on-rails-api/descope/app/assets/builds/controllers/index.js.map +7 -0
  66. data/examples/ruby-on-rails-api/descope/app/assets/builds/routes/index.css +62 -0
  67. data/examples/ruby-on-rails-api/descope/app/assets/builds/routes/index.css.map +7 -0
  68. data/examples/ruby-on-rails-api/descope/app/assets/builds/routes/index.js +27973 -0
  69. data/examples/ruby-on-rails-api/descope/app/assets/builds/routes/index.js.map +7 -0
  70. data/examples/ruby-on-rails-api/descope/package-lock.json +1021 -19307
  71. data/examples/ruby-on-rails-api/descope/package.json +8 -16
  72. data/examples/ruby-on-rails-api/descope/yarn.lock +459 -10641
  73. data/lib/descope/api/v1/auth/otp.rb +21 -14
  74. data/lib/descope/api/v1/auth.rb +37 -25
  75. data/lib/descope/api/v1/management/access_key.rb +5 -4
  76. data/lib/descope/api/v1/management/audit.rb +24 -0
  77. data/lib/descope/api/v1/management/common.rb +5 -1
  78. data/lib/descope/api/v1/management/role.rb +22 -6
  79. data/lib/descope/api/v1/management/user.rb +17 -0
  80. data/lib/descope/mixins/common.rb +6 -13
  81. data/lib/descope/mixins/http.rb +1 -1
  82. data/lib/descope/mixins/validation.rb +21 -6
  83. data/lib/descope/version.rb +1 -1
  84. data/spec/integration/lib.descope/api/v1/auth/enchantedlink_spec.rb +81 -0
  85. data/spec/integration/lib.descope/api/v1/auth/magiclink_spec.rb +49 -0
  86. data/spec/integration/lib.descope/api/v1/auth/otp_spec.rb +103 -0
  87. data/spec/integration/lib.descope/api/v1/auth/password_spec.rb +41 -0
  88. data/spec/integration/lib.descope/api/v1/auth/totp_spec.rb +76 -0
  89. data/spec/integration/lib.descope/api/v1/management/access_key_spec.rb +62 -0
  90. data/spec/integration/lib.descope/api/v1/management/audit_spec.rb +52 -0
  91. data/spec/integration/lib.descope/api/v1/management/authz_spec.rb +187 -0
  92. data/spec/integration/lib.descope/api/v1/management/flow_spec.rb +44 -0
  93. data/spec/integration/lib.descope/api/v1/management/permissions_spec.rb +27 -0
  94. data/spec/integration/lib.descope/api/v1/management/project_spec.rb +29 -0
  95. data/spec/integration/lib.descope/api/v1/management/roles_spec.rb +116 -0
  96. data/spec/integration/lib.descope/api/v1/management/user_spec.rb +262 -0
  97. data/spec/lib.descope/api/v1/auth/otp_spec.rb +176 -18
  98. data/spec/lib.descope/api/v1/auth_spec.rb +50 -1
  99. data/spec/lib.descope/api/v1/management/access_key_spec.rb +4 -2
  100. data/spec/lib.descope/api/v1/management/audit_spec.rb +92 -0
  101. data/spec/lib.descope/api/v1/management/role_spec.rb +35 -6
  102. data/spec/lib.descope/api/v1/management/user_spec.rb +40 -0
  103. data/spec/spec_helper.rb +9 -38
  104. data/spec/support/client_config.rb +5 -1
  105. data/spec/support/dummy_class.rb +15 -1
  106. data/spec/support/utils.rb +1 -1
  107. metadata +77 -133
  108. data/examples/ruby-on-rails-api/descope/tmp/pids/.keep +0 -0
  109. data/examples/ruby-on-rails-api/descope/tmp/storage/.keep +0 -0
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ../../../..
3
3
  specs:
4
- descope (1.0.3)
4
+ descope (1.0.5)
5
5
  addressable (~> 2.8)
6
6
  jwt (~> 2.7)
7
7
  rest-client (~> 2.1)
@@ -11,35 +11,35 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- actioncable (7.1.3)
15
- actionpack (= 7.1.3)
16
- activesupport (= 7.1.3)
14
+ actioncable (7.1.3.2)
15
+ actionpack (= 7.1.3.2)
16
+ activesupport (= 7.1.3.2)
17
17
  nio4r (~> 2.0)
18
18
  websocket-driver (>= 0.6.1)
19
19
  zeitwerk (~> 2.6)
20
- actionmailbox (7.1.3)
21
- actionpack (= 7.1.3)
22
- activejob (= 7.1.3)
23
- activerecord (= 7.1.3)
24
- activestorage (= 7.1.3)
25
- activesupport (= 7.1.3)
20
+ actionmailbox (7.1.3.2)
21
+ actionpack (= 7.1.3.2)
22
+ activejob (= 7.1.3.2)
23
+ activerecord (= 7.1.3.2)
24
+ activestorage (= 7.1.3.2)
25
+ activesupport (= 7.1.3.2)
26
26
  mail (>= 2.7.1)
27
27
  net-imap
28
28
  net-pop
29
29
  net-smtp
30
- actionmailer (7.1.3)
31
- actionpack (= 7.1.3)
32
- actionview (= 7.1.3)
33
- activejob (= 7.1.3)
34
- activesupport (= 7.1.3)
30
+ actionmailer (7.1.3.2)
31
+ actionpack (= 7.1.3.2)
32
+ actionview (= 7.1.3.2)
33
+ activejob (= 7.1.3.2)
34
+ activesupport (= 7.1.3.2)
35
35
  mail (~> 2.5, >= 2.5.4)
36
36
  net-imap
37
37
  net-pop
38
38
  net-smtp
39
39
  rails-dom-testing (~> 2.2)
40
- actionpack (7.1.3)
41
- actionview (= 7.1.3)
42
- activesupport (= 7.1.3)
40
+ actionpack (7.1.3.2)
41
+ actionview (= 7.1.3.2)
42
+ activesupport (= 7.1.3.2)
43
43
  nokogiri (>= 1.8.5)
44
44
  racc
45
45
  rack (>= 2.2.4)
@@ -47,35 +47,35 @@ GEM
47
47
  rack-test (>= 0.6.3)
48
48
  rails-dom-testing (~> 2.2)
49
49
  rails-html-sanitizer (~> 1.6)
50
- actiontext (7.1.3)
51
- actionpack (= 7.1.3)
52
- activerecord (= 7.1.3)
53
- activestorage (= 7.1.3)
54
- activesupport (= 7.1.3)
50
+ actiontext (7.1.3.2)
51
+ actionpack (= 7.1.3.2)
52
+ activerecord (= 7.1.3.2)
53
+ activestorage (= 7.1.3.2)
54
+ activesupport (= 7.1.3.2)
55
55
  globalid (>= 0.6.0)
56
56
  nokogiri (>= 1.8.5)
57
- actionview (7.1.3)
58
- activesupport (= 7.1.3)
57
+ actionview (7.1.3.2)
58
+ activesupport (= 7.1.3.2)
59
59
  builder (~> 3.1)
60
60
  erubi (~> 1.11)
61
61
  rails-dom-testing (~> 2.2)
62
62
  rails-html-sanitizer (~> 1.6)
63
- activejob (7.1.3)
64
- activesupport (= 7.1.3)
63
+ activejob (7.1.3.2)
64
+ activesupport (= 7.1.3.2)
65
65
  globalid (>= 0.3.6)
66
- activemodel (7.1.3)
67
- activesupport (= 7.1.3)
68
- activerecord (7.1.3)
69
- activemodel (= 7.1.3)
70
- activesupport (= 7.1.3)
66
+ activemodel (7.1.3.2)
67
+ activesupport (= 7.1.3.2)
68
+ activerecord (7.1.3.2)
69
+ activemodel (= 7.1.3.2)
70
+ activesupport (= 7.1.3.2)
71
71
  timeout (>= 0.4.0)
72
- activestorage (7.1.3)
73
- actionpack (= 7.1.3)
74
- activejob (= 7.1.3)
75
- activerecord (= 7.1.3)
76
- activesupport (= 7.1.3)
72
+ activestorage (7.1.3.2)
73
+ actionpack (= 7.1.3.2)
74
+ activejob (= 7.1.3.2)
75
+ activerecord (= 7.1.3.2)
76
+ activesupport (= 7.1.3.2)
77
77
  marcel (~> 1.0)
78
- activesupport (7.1.3)
78
+ activesupport (7.1.3.2)
79
79
  base64
80
80
  bigdecimal
81
81
  concurrent-ruby (~> 1.0, >= 1.0.2)
@@ -87,10 +87,11 @@ GEM
87
87
  tzinfo (~> 2.0)
88
88
  addressable (2.8.6)
89
89
  public_suffix (>= 2.0.2, < 6.0)
90
+ ast (2.4.2)
90
91
  base64 (0.2.0)
91
- bigdecimal (3.1.6)
92
+ bigdecimal (3.1.7)
92
93
  bindex (0.8.1)
93
- bootsnap (1.17.1)
94
+ bootsnap (1.18.3)
94
95
  msgpack (~> 1.2)
95
96
  builder (3.2.4)
96
97
  concurrent-ruby (1.2.3)
@@ -99,22 +100,21 @@ GEM
99
100
  cssbundling-rails (1.4.0)
100
101
  railties (>= 6.0.0)
101
102
  date (3.3.4)
102
- debug (1.9.1)
103
+ debug (1.9.2)
103
104
  irb (~> 1.10)
104
105
  reline (>= 0.3.8)
105
106
  domain_name (0.6.20240107)
106
- drb (2.2.0)
107
- ruby2_keywords
107
+ drb (2.2.1)
108
108
  erubi (1.12.0)
109
109
  globalid (1.2.1)
110
110
  activesupport (>= 6.1)
111
111
  http-accept (1.7.0)
112
112
  http-cookie (1.0.5)
113
113
  domain_name (~> 0.5)
114
- i18n (1.14.1)
114
+ i18n (1.14.4)
115
115
  concurrent-ruby (~> 1.0)
116
116
  io-console (0.7.2)
117
- irb (1.11.1)
117
+ irb (1.12.0)
118
118
  rdoc
119
119
  reline (>= 0.4.2)
120
120
  jbuilder (2.11.5)
@@ -122,7 +122,10 @@ GEM
122
122
  activesupport (>= 5.0.0)
123
123
  jsbundling-rails (1.3.0)
124
124
  railties (>= 6.0.0)
125
- jwt (2.7.1)
125
+ json (2.7.2)
126
+ jwt (2.8.1)
127
+ base64
128
+ language_server-protocol (3.17.0.3)
126
129
  loofah (2.22.0)
127
130
  crass (~> 1.0.2)
128
131
  nokogiri (>= 1.12.0)
@@ -131,44 +134,48 @@ GEM
131
134
  net-imap
132
135
  net-pop
133
136
  net-smtp
134
- marcel (1.0.2)
137
+ marcel (1.0.4)
135
138
  mime-types (3.5.2)
136
139
  mime-types-data (~> 3.2015)
137
- mime-types-data (3.2023.1205)
140
+ mime-types-data (3.2024.0305)
138
141
  mini_mime (1.1.5)
139
- minitest (5.21.2)
142
+ minitest (5.22.3)
140
143
  msgpack (1.7.2)
141
144
  mutex_m (0.2.0)
142
- net-imap (0.4.9.1)
145
+ net-imap (0.4.10)
143
146
  date
144
147
  net-protocol
145
148
  net-pop (0.1.2)
146
149
  net-protocol
147
150
  net-protocol (0.2.2)
148
151
  timeout
149
- net-smtp (0.4.0.1)
152
+ net-smtp (0.5.0)
150
153
  net-protocol
151
154
  netrc (0.11.0)
152
- nio4r (2.7.0)
153
- nokogiri (1.16.2-aarch64-linux)
155
+ nio4r (2.7.1)
156
+ nokogiri (1.16.3-aarch64-linux)
154
157
  racc (~> 1.4)
155
- nokogiri (1.16.2-arm-linux)
158
+ nokogiri (1.16.3-arm-linux)
156
159
  racc (~> 1.4)
157
- nokogiri (1.16.2-arm64-darwin)
160
+ nokogiri (1.16.3-arm64-darwin)
158
161
  racc (~> 1.4)
159
- nokogiri (1.16.2-x86-linux)
162
+ nokogiri (1.16.3-x86-linux)
160
163
  racc (~> 1.4)
161
- nokogiri (1.16.2-x86_64-darwin)
164
+ nokogiri (1.16.3-x86_64-darwin)
162
165
  racc (~> 1.4)
163
- nokogiri (1.16.2-x86_64-linux)
166
+ nokogiri (1.16.3-x86_64-linux)
164
167
  racc (~> 1.4)
168
+ parallel (1.24.0)
169
+ parser (3.3.0.5)
170
+ ast (~> 2.4.1)
171
+ racc
165
172
  psych (5.1.2)
166
173
  stringio
167
- public_suffix (5.0.4)
174
+ public_suffix (5.0.5)
168
175
  puma (6.4.2)
169
176
  nio4r (~> 2.0)
170
177
  racc (1.7.3)
171
- rack (3.0.8)
178
+ rack (3.0.10)
172
179
  rack-session (2.0.0)
173
180
  rack (>= 3.0.0)
174
181
  rack-test (2.1.0)
@@ -176,20 +183,20 @@ GEM
176
183
  rackup (2.1.0)
177
184
  rack (>= 3)
178
185
  webrick (~> 1.8)
179
- rails (7.1.3)
180
- actioncable (= 7.1.3)
181
- actionmailbox (= 7.1.3)
182
- actionmailer (= 7.1.3)
183
- actionpack (= 7.1.3)
184
- actiontext (= 7.1.3)
185
- actionview (= 7.1.3)
186
- activejob (= 7.1.3)
187
- activemodel (= 7.1.3)
188
- activerecord (= 7.1.3)
189
- activestorage (= 7.1.3)
190
- activesupport (= 7.1.3)
186
+ rails (7.1.3.2)
187
+ actioncable (= 7.1.3.2)
188
+ actionmailbox (= 7.1.3.2)
189
+ actionmailer (= 7.1.3.2)
190
+ actionpack (= 7.1.3.2)
191
+ actiontext (= 7.1.3.2)
192
+ actionview (= 7.1.3.2)
193
+ activejob (= 7.1.3.2)
194
+ activemodel (= 7.1.3.2)
195
+ activerecord (= 7.1.3.2)
196
+ activestorage (= 7.1.3.2)
197
+ activesupport (= 7.1.3.2)
191
198
  bundler (>= 1.15.0)
192
- railties (= 7.1.3)
199
+ railties (= 7.1.3.2)
193
200
  rails-dom-testing (2.2.0)
194
201
  activesupport (>= 5.0.0)
195
202
  minitest
@@ -197,18 +204,20 @@ GEM
197
204
  rails-html-sanitizer (1.6.0)
198
205
  loofah (~> 2.21)
199
206
  nokogiri (~> 1.14)
200
- railties (7.1.3)
201
- actionpack (= 7.1.3)
202
- activesupport (= 7.1.3)
207
+ railties (7.1.3.2)
208
+ actionpack (= 7.1.3.2)
209
+ activesupport (= 7.1.3.2)
203
210
  irb
204
211
  rackup (>= 1.0.0)
205
212
  rake (>= 12.2)
206
213
  thor (~> 1.0, >= 1.2.2)
207
214
  zeitwerk (~> 2.6)
208
- rake (13.1.0)
209
- rdoc (6.6.2)
215
+ rainbow (3.1.1)
216
+ rake (13.2.1)
217
+ rdoc (6.6.3.1)
210
218
  psych (>= 4.0.0)
211
- reline (0.4.2)
219
+ regexp_parser (2.9.0)
220
+ reline (0.5.1)
212
221
  io-console (~> 0.5)
213
222
  rest-client (2.1.0)
214
223
  http-accept (>= 1.7.0, < 2.0)
@@ -216,7 +225,26 @@ GEM
216
225
  mime-types (>= 1.16, < 4.0)
217
226
  netrc (~> 0.8)
218
227
  retryable (3.0.5)
219
- ruby2_keywords (0.0.5)
228
+ rexml (3.2.6)
229
+ rubocop (1.63.0)
230
+ json (~> 2.3)
231
+ language_server-protocol (>= 3.17.0)
232
+ parallel (~> 1.10)
233
+ parser (>= 3.3.0.2)
234
+ rainbow (>= 2.2.2, < 4.0)
235
+ regexp_parser (>= 1.8, < 3.0)
236
+ rexml (>= 3.2.5, < 4.0)
237
+ rubocop-ast (>= 1.31.1, < 2.0)
238
+ ruby-progressbar (~> 1.7)
239
+ unicode-display_width (>= 2.4.0, < 3.0)
240
+ rubocop-ast (1.31.2)
241
+ parser (>= 3.3.0.4)
242
+ rubocop-rails (2.24.1)
243
+ activesupport (>= 4.2.0)
244
+ rack (>= 1.1)
245
+ rubocop (>= 1.33.0, < 2.0)
246
+ rubocop-ast (>= 1.31.1, < 2.0)
247
+ ruby-progressbar (1.13.0)
220
248
  sprockets (4.2.1)
221
249
  concurrent-ruby (~> 1.0)
222
250
  rack (>= 2.2.4, < 4)
@@ -224,23 +252,24 @@ GEM
224
252
  actionpack (>= 5.2)
225
253
  activesupport (>= 5.2)
226
254
  sprockets (>= 3.0.0)
227
- sqlite3 (1.7.0-aarch64-linux)
228
- sqlite3 (1.7.0-arm-linux)
229
- sqlite3 (1.7.0-arm64-darwin)
230
- sqlite3 (1.7.0-x86-linux)
231
- sqlite3 (1.7.0-x86_64-darwin)
232
- sqlite3 (1.7.0-x86_64-linux)
255
+ sqlite3 (1.7.3-aarch64-linux)
256
+ sqlite3 (1.7.3-arm-linux)
257
+ sqlite3 (1.7.3-arm64-darwin)
258
+ sqlite3 (1.7.3-x86-linux)
259
+ sqlite3 (1.7.3-x86_64-darwin)
260
+ sqlite3 (1.7.3-x86_64-linux)
233
261
  stimulus-rails (1.3.3)
234
262
  railties (>= 6.0.0)
235
263
  stringio (3.1.0)
236
- thor (1.3.0)
264
+ thor (1.3.1)
237
265
  timeout (0.4.1)
238
- turbo-rails (1.5.0)
266
+ turbo-rails (2.0.5)
239
267
  actionpack (>= 6.0.0)
240
268
  activejob (>= 6.0.0)
241
269
  railties (>= 6.0.0)
242
270
  tzinfo (2.0.6)
243
271
  concurrent-ruby (~> 1.0)
272
+ unicode-display_width (2.5.0)
244
273
  web-console (4.2.1)
245
274
  actionview (>= 6.0.0)
246
275
  activemodel (>= 6.0.0)
@@ -251,7 +280,7 @@ GEM
251
280
  websocket-extensions (>= 0.1.0)
252
281
  websocket-extensions (0.1.5)
253
282
  zache (0.13.1)
254
- zeitwerk (2.6.12)
283
+ zeitwerk (2.6.13)
255
284
 
256
285
  PLATFORMS
257
286
  aarch64-linux
@@ -269,7 +298,9 @@ DEPENDENCIES
269
298
  jbuilder
270
299
  jsbundling-rails
271
300
  puma (>= 5.0)
272
- rails (~> 7.1.3)
301
+ rails (~> 7.1.3.2)
302
+ rdoc (>= 6.6.3.1)
303
+ rubocop-rails (= 2.24.1)
273
304
  sprockets-rails
274
305
  sqlite3 (~> 1.4)
275
306
  stimulus-rails
@@ -7,29 +7,29 @@ Add Descope's Ruby SDK to add authentication to a Rails 7 + React.js app. The pr
7
7
 
8
8
  1. Install dependencies:
9
9
 
10
- ```
11
- bundle install
12
- ```
13
-
14
- 3. Client Setup
15
-
16
- Create a ```.env``` file in the root directory of the `client` folder and add your Descope [Project ID](https://app.descope.com/settings/project) in the file:
10
+ ```
11
+ bundle install
12
+ ```
17
13
 
18
- ```
19
- REACT_APP_PROJECT_ID="YOUR_DESCOPE_PROJECT_ID"
20
- ```
14
+ 2. Client Setup
21
15
 
22
- > **NOTE**: If you're running your flask server on a different port than 3000, change the ```"proxy":"http://127.0.0.1:3000/"``` value to wherever your server is hosted. You can edit the proxy value in your client package.json file.
16
+ Create a ```.env``` file in the root directory of the `client` folder and add your Descope [Project ID](https://app.descope.com/settings/project) in the file:
17
+
18
+ ```toml
19
+ REACT_APP_PROJECT_ID="YOUR_DESCOPE_PROJECT_ID"
20
+ ```
23
21
 
24
- 4. Server Setup
22
+ > **NOTE**: If you're running your flask server on a different port than 3000, change the ```"proxy":"http://127.0.0.1:3000/"``` value to wherever your server is hosted. You can edit the proxy value in your client package.json file.
25
23
 
26
- Since this app also showcases roles, it will require you to set them up in the Descope Console.
24
+ 3. Server Setup
27
25
 
28
- - Create two different [roles]((https://app.descope.com/authorization)) called "teacher" and "student" <br>
29
- - Create a ```.env``` file in the server folder and add your project id in the file:
30
- ```
31
- PROJECT_ID="YOUR_DESCOPE_PROJECT_ID"
32
- ```
26
+ Since this app also showcases roles, it will require you to set them up in the Descope Console.
27
+
28
+ - Create two different [roles]((https://app.descope.com/authorization)) called "teacher" and "student" <br>
29
+ - Create a ```.env``` file in the server folder and add your project id in the file:
30
+ ```toml
31
+ PROJECT_ID="YOUR_DESCOPE_PROJECT_ID"
32
+ ```
33
33
 
34
34
  ## 🔮 Running the Application
35
35
 
@@ -0,0 +1,62 @@
1
+ @import "https://fonts.googleapis.com/css2?family=Golos+Text:wght@500&display=swap";
2
+
3
+ /* app/javascript/App.css */
4
+ .page {
5
+ display: flex;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ justify-content: center;
9
+ margin-bottom: 5vh;
10
+ }
11
+ .title {
12
+ margin-top: 10vh;
13
+ margin-bottom: 5vh;
14
+ font-size: 2em;
15
+ }
16
+ .link {
17
+ text-decoration: none;
18
+ margin-bottom: 5vh;
19
+ }
20
+ .btn {
21
+ border: None;
22
+ background-color: #00BD67;
23
+ padding: 15px 25px;
24
+ color: #fff;
25
+ font-size: 1.1em;
26
+ border-radius: 9px;
27
+ margin-top: 12px;
28
+ margin-right: 1vh;
29
+ }
30
+ .student {
31
+ margin-bottom: 5vh;
32
+ }
33
+ .students {
34
+ font-size: 1.5em;
35
+ }
36
+ body {
37
+ margin: 0;
38
+ font-family:
39
+ -apple-system,
40
+ BlinkMacSystemFont,
41
+ "Segoe UI",
42
+ "Roboto",
43
+ "Oxygen",
44
+ "Ubuntu",
45
+ "Cantarell",
46
+ "Fira Sans",
47
+ "Droid Sans",
48
+ "Helvetica Neue",
49
+ sans-serif;
50
+ -webkit-font-smoothing: antialiased;
51
+ -moz-osx-font-smoothing: grayscale;
52
+ }
53
+ code {
54
+ font-family:
55
+ source-code-pro,
56
+ Menlo,
57
+ Monaco,
58
+ Consolas,
59
+ "Courier New",
60
+ monospace;
61
+ }
62
+ /*# sourceMappingURL=/assets/App.css.map */
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../javascript/App.css"],
4
+ "sourcesContent": ["@import url('https://fonts.googleapis.com/css2?family=Golos+Text:wght@500&display=swap');\n\n.page {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n margin-bottom: 5vh;\n}\n\n.title {\n margin-top: 10vh;\n margin-bottom: 5vh;\n font-size: 2em;\n}\n\n.link {\n text-decoration: none;\n margin-bottom: 5vh;\n}\n\n.btn {\n border: None;\n background-color: #00BD67;\n padding: 15px 25px;\n color: #fff;\n font-size: 1.1em;\n border-radius: 9px;\n margin-top: 12px;\n margin-right: 1vh;\n}\n\n.student {\n margin-bottom: 5vh;\n}\n\n.students {\n font-size: 1.5em;\n}\n\nbody {\n margin: 0;\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',\n 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',\n sans-serif;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\ncode {\n font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',\n monospace;\n}\n"],
5
+ "mappings": ";;;AAEA,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,eAAa;AACb,mBAAiB;AACjB,iBAAe;AACjB;AAEA,CAAC;AACC,cAAY;AACZ,iBAAe;AACf,aAAW;AACb;AAEA,CAAC;AACC,mBAAiB;AACjB,iBAAe;AACjB;AAEA,CAAC;AACC,UAAQ;AACR,oBAAkB;AAClB,WAAS,KAAK;AACd,SAAO;AACP,aAAW;AACX,iBAAe;AACf,cAAY;AACZ,gBAAc;AAChB;AAEA,CAAC;AACC,iBAAe;AACjB;AAEA,CAAC;AACC,aAAW;AACb;AAEA;AACE,UAAQ;AACR;AAAA,IAAa,aAAa;AAAA,IAAE,kBAAkB;AAAA,IAAE,UAAU;AAAA,IAAE,QAAQ;AAAA,IAAE,QAAQ;AAAA,IAC9E,QAAQ;AAAA,IAAE,WAAW;AAAA,IAAE,WAAW;AAAA,IAAE,YAAY;AAAA,IAAE,gBAAgB;AAAA,IAClE;AACA,0BAAwB;AACxB,2BAAyB;AAC3B;AAEA;AACE;AAAA,IAAa,eAAe;AAAA,IAAE,KAAK;AAAA,IAAE,MAAM;AAAA,IAAE,QAAQ;AAAA,IAAE,aAAa;AAAA,IACpE;AACF;",
6
+ "names": []
7
+ }