kaze 2.1.0 → 2.2.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 +4 -4
- data/CHANGELOG.md +69 -1
- data/README.md +42 -2
- data/lib/kaze/commands/app/base_stack.rb +14 -0
- data/lib/kaze/commands/app/hotwire_stack.rb +4 -1
- data/lib/kaze/commands/app/inertia_react_stack.rb +3 -1
- data/lib/kaze/commands/app/inertia_vue_stack.rb +3 -1
- data/lib/kaze/version.rb +1 -1
- data/stubs/default/app/forms/auth/login_form.rb +6 -1
- data/stubs/default/app/forms/auth/two_factor_challenge_form.rb +24 -0
- data/stubs/default/app/forms/confirm_two_factor_form.rb +5 -0
- data/stubs/default/app/forms/disable_two_factor_form.rb +7 -0
- data/stubs/default/app/models/concerns/two_factor_authenticatable.rb +112 -0
- data/stubs/default/app/models/session_guard.rb +8 -1
- data/stubs/default/app/models/two_factor_challenge.rb +55 -0
- data/stubs/default/app/models/user.rb +1 -0
- data/stubs/default/config/initializers/active_record_encryption.rb +20 -0
- data/stubs/default/config/routes.rb +9 -0
- data/stubs/default/db/migrate/20240101000001_add_two_factor_to_users.rb +15 -0
- data/stubs/default/test/integration/auth/rate_limiting_test.rb +64 -0
- data/stubs/default/test/integration/auth/two_factor_challenge_test.rb +114 -0
- data/stubs/default/test/integration/settings/two_factor_test.rb +104 -0
- data/stubs/default/test/models/two_factor_authenticatable_test.rb +143 -0
- data/stubs/default/test/test_helper.rb +16 -0
- data/stubs/hotwire/app/controllers/auth/authenticated_session_controller.rb +32 -1
- data/stubs/hotwire/app/controllers/auth/two_factor_challenge_controller.rb +59 -0
- data/stubs/hotwire/app/controllers/concerns/set_two_factor_challenge.rb +8 -0
- data/stubs/hotwire/app/controllers/settings/two_factor_controller.rb +48 -0
- data/stubs/hotwire/app/views/auth/forgot_password.html.erb +1 -1
- data/stubs/hotwire/app/views/auth/login.html.erb +1 -1
- data/stubs/hotwire/app/views/auth/register.html.erb +2 -2
- data/stubs/hotwire/app/views/auth/reset_password.html.erb +3 -3
- data/stubs/hotwire/app/views/auth/two_factor_challenge.html.erb +21 -0
- data/stubs/hotwire/app/views/auth/verify_email.html.erb +2 -2
- data/stubs/hotwire/app/views/layouts/_settings.html.erb +1 -0
- data/stubs/hotwire/app/views/layouts/_sidebar_user.html.erb +1 -1
- data/stubs/hotwire/app/views/settings/password/_update_password_form.html.erb +6 -6
- data/stubs/hotwire/app/views/settings/profile/_confirm_user_deletion_modal.html.erb +1 -1
- data/stubs/hotwire/app/views/settings/profile/_delete_user_form.html.erb +1 -1
- data/stubs/hotwire/app/views/settings/two_factor/_confirming.html.erb +20 -0
- data/stubs/hotwire/app/views/settings/two_factor/_disabled.html.erb +8 -0
- data/stubs/hotwire/app/views/settings/two_factor/_enabled.html.erb +29 -0
- data/stubs/hotwire/app/views/settings/two_factor/edit.html.erb +16 -0
- data/stubs/inertia-common/app/controllers/auth/authenticated_session_controller.rb +30 -1
- data/stubs/inertia-common/app/controllers/auth/two_factor_challenge_controller.rb +53 -0
- data/stubs/inertia-common/app/controllers/concerns/set_two_factor_challenge.rb +8 -0
- data/stubs/inertia-common/app/controllers/settings/two_factor_controller.rb +60 -0
- data/stubs/inertia-react-ts/app/javascript/Layouts/SettingsLayout.tsx +5 -1
- data/stubs/inertia-react-ts/app/javascript/Pages/Auth/ForgotPassword.tsx +2 -2
- data/stubs/inertia-react-ts/app/javascript/Pages/Auth/Register.tsx +1 -1
- data/stubs/inertia-react-ts/app/javascript/Pages/Auth/ResetPassword.tsx +3 -3
- data/stubs/inertia-react-ts/app/javascript/Pages/Auth/TwoFactorChallenge.tsx +71 -0
- data/stubs/inertia-react-ts/app/javascript/Pages/Auth/VerifyEmail.tsx +3 -3
- data/stubs/inertia-react-ts/app/javascript/Pages/Settings/Partials/DeleteUserForm.tsx +2 -2
- data/stubs/inertia-react-ts/app/javascript/Pages/Settings/Partials/UpdatePasswordForm.tsx +3 -3
- data/stubs/inertia-react-ts/app/javascript/Pages/Settings/TwoFactor.tsx +199 -0
- data/stubs/inertia-vue-ts/app/javascript/Layouts/SettingsLayout.vue +5 -1
- data/stubs/inertia-vue-ts/app/javascript/Pages/Auth/ForgotPassword.vue +2 -2
- data/stubs/inertia-vue-ts/app/javascript/Pages/Auth/Register.vue +1 -1
- data/stubs/inertia-vue-ts/app/javascript/Pages/Auth/ResetPassword.vue +3 -3
- data/stubs/inertia-vue-ts/app/javascript/Pages/Auth/TwoFactorChallenge.vue +60 -0
- data/stubs/inertia-vue-ts/app/javascript/Pages/Auth/VerifyEmail.vue +3 -3
- data/stubs/inertia-vue-ts/app/javascript/Pages/Settings/Partials/DeleteUserForm.vue +2 -2
- data/stubs/inertia-vue-ts/app/javascript/Pages/Settings/Partials/UpdatePasswordForm.vue +3 -3
- data/stubs/inertia-vue-ts/app/javascript/Pages/Settings/TwoFactor.vue +147 -0
- metadata +41 -1
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kaze
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Cuong Giang
|
|
@@ -37,6 +37,20 @@ dependencies:
|
|
|
37
37
|
- - "~>"
|
|
38
38
|
- !ruby/object:Gem::Version
|
|
39
39
|
version: '2.6'
|
|
40
|
+
- !ruby/object:Gem::Dependency
|
|
41
|
+
name: minitest
|
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
|
43
|
+
requirements:
|
|
44
|
+
- - "~>"
|
|
45
|
+
- !ruby/object:Gem::Version
|
|
46
|
+
version: '5.0'
|
|
47
|
+
type: :development
|
|
48
|
+
prerelease: false
|
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
+
requirements:
|
|
51
|
+
- - "~>"
|
|
52
|
+
- !ruby/object:Gem::Version
|
|
53
|
+
version: '5.0'
|
|
40
54
|
- !ruby/object:Gem::Dependency
|
|
41
55
|
name: railties
|
|
42
56
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -78,7 +92,10 @@ files:
|
|
|
78
92
|
- stubs/default/app/forms/auth/new_password_form.rb
|
|
79
93
|
- stubs/default/app/forms/auth/register_form.rb
|
|
80
94
|
- stubs/default/app/forms/auth/send_password_reset_link_form.rb
|
|
95
|
+
- stubs/default/app/forms/auth/two_factor_challenge_form.rb
|
|
96
|
+
- stubs/default/app/forms/confirm_two_factor_form.rb
|
|
81
97
|
- stubs/default/app/forms/delete_user_form.rb
|
|
98
|
+
- stubs/default/app/forms/disable_two_factor_form.rb
|
|
82
99
|
- stubs/default/app/forms/update_password_form.rb
|
|
83
100
|
- stubs/default/app/forms/update_profile_information_form.rb
|
|
84
101
|
- stubs/default/app/mailers/application_mailer.rb
|
|
@@ -86,8 +103,10 @@ files:
|
|
|
86
103
|
- stubs/default/app/models/application_record.rb
|
|
87
104
|
- stubs/default/app/models/concerns/can_reset_password.rb
|
|
88
105
|
- stubs/default/app/models/concerns/must_verify_email.rb
|
|
106
|
+
- stubs/default/app/models/concerns/two_factor_authenticatable.rb
|
|
89
107
|
- stubs/default/app/models/current.rb
|
|
90
108
|
- stubs/default/app/models/session_guard.rb
|
|
109
|
+
- stubs/default/app/models/two_factor_challenge.rb
|
|
91
110
|
- stubs/default/app/models/user.rb
|
|
92
111
|
- stubs/default/app/validators/current_password_validator.rb
|
|
93
112
|
- stubs/default/app/validators/email_validator.rb
|
|
@@ -98,16 +117,22 @@ files:
|
|
|
98
117
|
- stubs/default/app/views/user_mailer/reset_password.html.erb
|
|
99
118
|
- stubs/default/app/views/user_mailer/verify_email.html.erb
|
|
100
119
|
- stubs/default/bin/dev
|
|
120
|
+
- stubs/default/config/initializers/active_record_encryption.rb
|
|
101
121
|
- stubs/default/config/routes.rb
|
|
102
122
|
- stubs/default/db/migrate/20240101000000_create_users.rb
|
|
123
|
+
- stubs/default/db/migrate/20240101000001_add_two_factor_to_users.rb
|
|
103
124
|
- stubs/default/test/factories/users.rb
|
|
104
125
|
- stubs/default/test/integration/appearance_test.rb
|
|
105
126
|
- stubs/default/test/integration/auth/authentication_test.rb
|
|
106
127
|
- stubs/default/test/integration/auth/email_verification_test.rb
|
|
107
128
|
- stubs/default/test/integration/auth/password_reset_test.rb
|
|
129
|
+
- stubs/default/test/integration/auth/rate_limiting_test.rb
|
|
108
130
|
- stubs/default/test/integration/auth/registration_test.rb
|
|
131
|
+
- stubs/default/test/integration/auth/two_factor_challenge_test.rb
|
|
109
132
|
- stubs/default/test/integration/password_update_test.rb
|
|
110
133
|
- stubs/default/test/integration/profile_test.rb
|
|
134
|
+
- stubs/default/test/integration/settings/two_factor_test.rb
|
|
135
|
+
- stubs/default/test/models/two_factor_authenticatable_test.rb
|
|
111
136
|
- stubs/default/test/test_helper.rb
|
|
112
137
|
- stubs/hotwire/app/assets/tailwind/application.css
|
|
113
138
|
- stubs/hotwire/app/components/application_logo_component.rb
|
|
@@ -134,16 +159,19 @@ files:
|
|
|
134
159
|
- stubs/hotwire/app/controllers/auth/new_password_controller.rb
|
|
135
160
|
- stubs/hotwire/app/controllers/auth/password_reset_link_controller.rb
|
|
136
161
|
- stubs/hotwire/app/controllers/auth/registered_user_controller.rb
|
|
162
|
+
- stubs/hotwire/app/controllers/auth/two_factor_challenge_controller.rb
|
|
137
163
|
- stubs/hotwire/app/controllers/auth/verified_email_controller.rb
|
|
138
164
|
- stubs/hotwire/app/controllers/concerns/authenticate.rb
|
|
139
165
|
- stubs/hotwire/app/controllers/concerns/redirect_if_authenticated.rb
|
|
140
166
|
- stubs/hotwire/app/controllers/concerns/set_current_auth.rb
|
|
167
|
+
- stubs/hotwire/app/controllers/concerns/set_two_factor_challenge.rb
|
|
141
168
|
- stubs/hotwire/app/controllers/concerns/sidebar_state.rb
|
|
142
169
|
- stubs/hotwire/app/controllers/concerns/validate_signature.rb
|
|
143
170
|
- stubs/hotwire/app/controllers/dashboard_controller.rb
|
|
144
171
|
- stubs/hotwire/app/controllers/settings/appearance_controller.rb
|
|
145
172
|
- stubs/hotwire/app/controllers/settings/password_controller.rb
|
|
146
173
|
- stubs/hotwire/app/controllers/settings/profile_controller.rb
|
|
174
|
+
- stubs/hotwire/app/controllers/settings/two_factor_controller.rb
|
|
147
175
|
- stubs/hotwire/app/controllers/welcome_controller.rb
|
|
148
176
|
- stubs/hotwire/app/javascript/alpinejs.stub
|
|
149
177
|
- stubs/hotwire/app/javascript/application.js
|
|
@@ -151,6 +179,7 @@ files:
|
|
|
151
179
|
- stubs/hotwire/app/views/auth/login.html.erb
|
|
152
180
|
- stubs/hotwire/app/views/auth/register.html.erb
|
|
153
181
|
- stubs/hotwire/app/views/auth/reset_password.html.erb
|
|
182
|
+
- stubs/hotwire/app/views/auth/two_factor_challenge.html.erb
|
|
154
183
|
- stubs/hotwire/app/views/auth/verify_email.html.erb
|
|
155
184
|
- stubs/hotwire/app/views/dashboard/index.html.erb
|
|
156
185
|
- stubs/hotwire/app/views/layouts/_appearance.html.erb
|
|
@@ -169,6 +198,10 @@ files:
|
|
|
169
198
|
- stubs/hotwire/app/views/settings/profile/_update_profile_information_form.html.erb
|
|
170
199
|
- stubs/hotwire/app/views/settings/profile/destroy.turbo_stream.erb
|
|
171
200
|
- stubs/hotwire/app/views/settings/profile/edit.html.erb
|
|
201
|
+
- stubs/hotwire/app/views/settings/two_factor/_confirming.html.erb
|
|
202
|
+
- stubs/hotwire/app/views/settings/two_factor/_disabled.html.erb
|
|
203
|
+
- stubs/hotwire/app/views/settings/two_factor/_enabled.html.erb
|
|
204
|
+
- stubs/hotwire/app/views/settings/two_factor/edit.html.erb
|
|
172
205
|
- stubs/hotwire/app/views/welcome/index.html.erb
|
|
173
206
|
- stubs/hotwire/config/importmap.rb
|
|
174
207
|
- stubs/inertia-common/app/controllers/application_controller.rb
|
|
@@ -177,17 +210,20 @@ files:
|
|
|
177
210
|
- stubs/inertia-common/app/controllers/auth/new_password_controller.rb
|
|
178
211
|
- stubs/inertia-common/app/controllers/auth/password_reset_link_controller.rb
|
|
179
212
|
- stubs/inertia-common/app/controllers/auth/registered_user_controller.rb
|
|
213
|
+
- stubs/inertia-common/app/controllers/auth/two_factor_challenge_controller.rb
|
|
180
214
|
- stubs/inertia-common/app/controllers/auth/verified_email_controller.rb
|
|
181
215
|
- stubs/inertia-common/app/controllers/concerns/authenticate.rb
|
|
182
216
|
- stubs/inertia-common/app/controllers/concerns/handle_inertia_requests.rb
|
|
183
217
|
- stubs/inertia-common/app/controllers/concerns/redirect_if_authenticated.rb
|
|
184
218
|
- stubs/inertia-common/app/controllers/concerns/set_current_auth.rb
|
|
219
|
+
- stubs/inertia-common/app/controllers/concerns/set_two_factor_challenge.rb
|
|
185
220
|
- stubs/inertia-common/app/controllers/concerns/validate_signature.rb
|
|
186
221
|
- stubs/inertia-common/app/controllers/concerns/verify_csrf_token.rb
|
|
187
222
|
- stubs/inertia-common/app/controllers/dashboard_controller.rb
|
|
188
223
|
- stubs/inertia-common/app/controllers/settings/appearance_controller.rb
|
|
189
224
|
- stubs/inertia-common/app/controllers/settings/password_controller.rb
|
|
190
225
|
- stubs/inertia-common/app/controllers/settings/profile_controller.rb
|
|
226
|
+
- stubs/inertia-common/app/controllers/settings/two_factor_controller.rb
|
|
191
227
|
- stubs/inertia-common/app/controllers/welcome_controller.rb
|
|
192
228
|
- stubs/inertia-common/bin/vite
|
|
193
229
|
- stubs/inertia-common/config/initializers/inertia_rails.rb
|
|
@@ -229,6 +265,7 @@ files:
|
|
|
229
265
|
- stubs/inertia-react-ts/app/javascript/Pages/Auth/Login.tsx
|
|
230
266
|
- stubs/inertia-react-ts/app/javascript/Pages/Auth/Register.tsx
|
|
231
267
|
- stubs/inertia-react-ts/app/javascript/Pages/Auth/ResetPassword.tsx
|
|
268
|
+
- stubs/inertia-react-ts/app/javascript/Pages/Auth/TwoFactorChallenge.tsx
|
|
232
269
|
- stubs/inertia-react-ts/app/javascript/Pages/Auth/VerifyEmail.tsx
|
|
233
270
|
- stubs/inertia-react-ts/app/javascript/Pages/Dashboard.tsx
|
|
234
271
|
- stubs/inertia-react-ts/app/javascript/Pages/Settings/Appearance.tsx
|
|
@@ -238,6 +275,7 @@ files:
|
|
|
238
275
|
- stubs/inertia-react-ts/app/javascript/Pages/Settings/Partials/UpdateProfileInformationForm.tsx
|
|
239
276
|
- stubs/inertia-react-ts/app/javascript/Pages/Settings/Password.tsx
|
|
240
277
|
- stubs/inertia-react-ts/app/javascript/Pages/Settings/Profile.tsx
|
|
278
|
+
- stubs/inertia-react-ts/app/javascript/Pages/Settings/TwoFactor.tsx
|
|
241
279
|
- stubs/inertia-react-ts/app/javascript/Pages/Welcome.tsx
|
|
242
280
|
- stubs/inertia-react-ts/app/javascript/entrypoints/application.tsx
|
|
243
281
|
- stubs/inertia-react-ts/app/javascript/entrypoints/bootstrap.ts
|
|
@@ -358,6 +396,7 @@ files:
|
|
|
358
396
|
- stubs/inertia-vue-ts/app/javascript/Pages/Auth/Login.vue
|
|
359
397
|
- stubs/inertia-vue-ts/app/javascript/Pages/Auth/Register.vue
|
|
360
398
|
- stubs/inertia-vue-ts/app/javascript/Pages/Auth/ResetPassword.vue
|
|
399
|
+
- stubs/inertia-vue-ts/app/javascript/Pages/Auth/TwoFactorChallenge.vue
|
|
361
400
|
- stubs/inertia-vue-ts/app/javascript/Pages/Auth/VerifyEmail.vue
|
|
362
401
|
- stubs/inertia-vue-ts/app/javascript/Pages/Dashboard.vue
|
|
363
402
|
- stubs/inertia-vue-ts/app/javascript/Pages/Settings/Appearance.vue
|
|
@@ -367,6 +406,7 @@ files:
|
|
|
367
406
|
- stubs/inertia-vue-ts/app/javascript/Pages/Settings/Partials/UpdateProfileInformationForm.vue
|
|
368
407
|
- stubs/inertia-vue-ts/app/javascript/Pages/Settings/Password.vue
|
|
369
408
|
- stubs/inertia-vue-ts/app/javascript/Pages/Settings/Profile.vue
|
|
409
|
+
- stubs/inertia-vue-ts/app/javascript/Pages/Settings/TwoFactor.vue
|
|
370
410
|
- stubs/inertia-vue-ts/app/javascript/Pages/Welcome.vue
|
|
371
411
|
- stubs/inertia-vue-ts/app/javascript/composables/useInitials.ts
|
|
372
412
|
- stubs/inertia-vue-ts/app/javascript/entrypoints/application.ts
|