rails_authentication 0.5.0 → 0.7.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.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +118 -8
  3. data/lib/generators/authentication/authentication_generator.rb +70 -8
  4. data/lib/generators/authentication/features/confirmable.rb +5 -5
  5. data/lib/generators/authentication/features/invitable.rb +5 -5
  6. data/lib/generators/authentication/features/lockable.rb +5 -5
  7. data/lib/generators/authentication/features/magic_link.rb +5 -5
  8. data/lib/generators/authentication/features/ott.rb +5 -5
  9. data/lib/generators/authentication/features/recoverable.rb +8 -6
  10. data/lib/generators/authentication/features/rememberable.rb +8 -3
  11. data/lib/generators/authentication/templates/app/controllers/concerns/authentication.rb.tt +61 -14
  12. data/lib/generators/authentication/templates/app/controllers/confirmations_controller.rb.tt +9 -5
  13. data/lib/generators/authentication/templates/app/controllers/invitations_controller.rb.tt +19 -5
  14. data/lib/generators/authentication/templates/app/controllers/magic_links_controller.rb.tt +9 -7
  15. data/lib/generators/authentication/templates/app/controllers/otts_controller.rb.tt +12 -9
  16. data/lib/generators/authentication/templates/app/controllers/passkey_sessions_controller.rb.tt +9 -7
  17. data/lib/generators/authentication/templates/app/controllers/passwords_controller.rb.tt +21 -8
  18. data/lib/generators/authentication/templates/app/controllers/registrations_controller.rb.tt +7 -5
  19. data/lib/generators/authentication/templates/app/controllers/sessions_controller.rb.tt +9 -7
  20. data/lib/generators/authentication/templates/app/controllers/unlocks_controller.rb.tt +7 -5
  21. data/lib/generators/authentication/templates/app/controllers/webauthn_credentials_controller.rb.tt +7 -3
  22. data/lib/generators/authentication/templates/app/mailers/confirmations_mailer.rb.tt +4 -2
  23. data/lib/generators/authentication/templates/app/mailers/invitations_mailer.rb.tt +3 -1
  24. data/lib/generators/authentication/templates/app/mailers/magic_links_mailer.rb.tt +3 -1
  25. data/lib/generators/authentication/templates/app/mailers/otts_mailer.rb.tt +3 -1
  26. data/lib/generators/authentication/templates/app/mailers/passwords_mailer.rb.tt +3 -1
  27. data/lib/generators/authentication/templates/app/mailers/unlocks_mailer.rb.tt +3 -1
  28. data/lib/generators/authentication/templates/app/models/concerns/confirmable_concern.rb.tt +7 -2
  29. data/lib/generators/authentication/templates/app/models/concerns/invitable_concern.rb.tt +17 -5
  30. data/lib/generators/authentication/templates/app/models/concerns/lockable_concern.rb.tt +8 -0
  31. data/lib/generators/authentication/templates/app/models/concerns/magic_link_concern.rb.tt +2 -0
  32. data/lib/generators/authentication/templates/app/models/concerns/ott_concern.rb.tt +2 -0
  33. data/lib/generators/authentication/templates/app/models/concerns/passkey_concern.rb.tt +2 -0
  34. data/lib/generators/authentication/templates/app/models/concerns/recoverable_concern.rb.tt +8 -0
  35. data/lib/generators/authentication/templates/app/models/concerns/timeoutable_concern.rb.tt +2 -0
  36. data/lib/generators/authentication/templates/app/models/concerns/trackable_concern.rb.tt +2 -0
  37. data/lib/generators/authentication/templates/app/models/concerns/validatable_concern.rb.tt +5 -3
  38. data/lib/generators/authentication/templates/app/models/session.rb.tt +45 -0
  39. data/lib/generators/authentication/templates/app/models/user_auth.rb.tt +5 -3
  40. data/lib/generators/authentication/templates/app/models/webauthn_credential.rb.tt +2 -0
  41. data/lib/generators/authentication/templates/app/views/confirmations/new.html.erb.tt +3 -3
  42. data/lib/generators/authentication/templates/app/views/confirmations_mailer/confirmation_instructions.html.erb.tt +3 -3
  43. data/lib/generators/authentication/templates/app/views/confirmations_mailer/confirmation_instructions.text.erb.tt +2 -2
  44. data/lib/generators/authentication/templates/app/views/invitations/edit.html.erb.tt +4 -4
  45. data/lib/generators/authentication/templates/app/views/invitations/new.html.erb.tt +3 -3
  46. data/lib/generators/authentication/templates/app/views/invitations_mailer/invitation_instructions.html.erb.tt +3 -3
  47. data/lib/generators/authentication/templates/app/views/invitations_mailer/invitation_instructions.text.erb.tt +2 -2
  48. data/lib/generators/authentication/templates/app/views/magic_links/new.html.erb.tt +4 -4
  49. data/lib/generators/authentication/templates/app/views/magic_links_mailer/magic_link.html.erb.tt +3 -3
  50. data/lib/generators/authentication/templates/app/views/magic_links_mailer/magic_link.text.erb.tt +2 -3
  51. data/lib/generators/authentication/templates/app/views/otts/edit.html.erb.tt +7 -7
  52. data/lib/generators/authentication/templates/app/views/otts_mailer/ott.html.erb.tt +3 -3
  53. data/lib/generators/authentication/templates/app/views/otts_mailer/ott.text.erb.tt +3 -3
  54. data/lib/generators/authentication/templates/app/views/passwords/edit.html.erb.tt +9 -0
  55. data/lib/generators/authentication/templates/app/views/passwords/new.html.erb.tt +8 -0
  56. data/lib/generators/authentication/templates/app/views/passwords_mailer/reset.html.erb.tt +3 -3
  57. data/lib/generators/authentication/templates/app/views/passwords_mailer/reset.text.erb.tt +2 -2
  58. data/lib/generators/authentication/templates/app/views/registrations/edit.html.erb.tt +6 -6
  59. data/lib/generators/authentication/templates/app/views/registrations/new.html.erb.tt +6 -6
  60. data/lib/generators/authentication/templates/app/views/sessions/new.html.erb.tt +20 -16
  61. data/lib/generators/authentication/templates/app/views/unlocks/new.html.erb.tt +3 -3
  62. data/lib/generators/authentication/templates/app/views/unlocks_mailer/unlock_instructions.html.erb.tt +3 -3
  63. data/lib/generators/authentication/templates/app/views/unlocks_mailer/unlock_instructions.text.erb.tt +3 -3
  64. data/lib/generators/authentication/templates/app/views/webauthn_credentials/index.html.erb.tt +5 -5
  65. data/lib/generators/authentication/templates/app/views/webauthn_credentials/new.html.erb.tt +12 -6
  66. data/lib/generators/authentication/templates/config/initializers/webauthn.rb.tt +2 -0
  67. data/lib/generators/authentication/templates/config/locales/authentication.en.yml.tt +421 -0
  68. data/lib/generators/authentication/templates/db/migrate/add_rememberable_to_sessions.rb.tt +5 -0
  69. data/lib/generators/authentication/templates/db/migrate/remove_remember_created_at_from_users.rb.tt +11 -0
  70. data/lib/rails_authentication/version.rb +1 -1
  71. metadata +9 -4
  72. data/lib/generators/authentication/templates/app/models/concerns/rememberable_concern.rb.tt +0 -15
  73. data/lib/generators/authentication/templates/db/migrate/add_rememberable_to_users.rb.tt +0 -5
@@ -0,0 +1,421 @@
1
+ ---
2
+ en:
3
+ <% if validatable? -%>
4
+ activerecord:
5
+ errors:
6
+ models:
7
+ user:
8
+ attributes:
9
+ password:
10
+ complexity: must meet password complexity standards
11
+ <% end -%>
12
+ <% if confirmable? -%>
13
+ confirmations:
14
+ new:
15
+ form:
16
+ button:
17
+ submit: Resend confirmation instructions
18
+ input:
19
+ email:
20
+ placeholder: Enter your email address
21
+ heading: Resend confirmation instructions
22
+ <% end -%>
23
+ <% if confirmable? -%>
24
+ confirmations_mailer:
25
+ confirmation_instructions:
26
+ confirm_on: You can confirm your email address on
27
+ confirmation_page: this confirmation page
28
+ expire_in: This link will expire in %{ttl}.
29
+ subject: Confirm your email address
30
+ <% end -%>
31
+ flash:
32
+ authentication:
33
+ alert:
34
+ already_signed_in: You are already signed in.
35
+ <% if confirmable? -%>
36
+ confirmations:
37
+ create:
38
+ alert:
39
+ rate_limited: Try again later.
40
+ notice: Confirmation instructions sent (if user with that email address exists and is unconfirmed).
41
+ show:
42
+ alert:
43
+ invalid_token: Confirmation link is invalid or has expired.
44
+ notice: Your email address has been confirmed. Please sign in.
45
+ <% end -%>
46
+ <% if invitable? -%>
47
+ invitations:
48
+ create:
49
+ notice: Invitation sent to %{email_address}.
50
+ edit:
51
+ alert:
52
+ invalid_token: Invitation link is invalid or has expired.
53
+ update:
54
+ alert:
55
+ invalid_token: Invitation link is invalid or has expired.
56
+ notice: Welcome! Your account is ready.
57
+ <% end -%>
58
+ <% if magic_link? -%>
59
+ magic_links:
60
+ create:
61
+ alert:
62
+ rate_limited: Try again later.
63
+ notice: Sign-in link sent (if a user with that email address exists).
64
+ show:
65
+ alert:
66
+ invalid_token: Sign-in link is invalid or has expired.
67
+ <% if invitable? -%>
68
+ invitation_pending: You must accept your invitation before signing in.
69
+ <% end -%>
70
+ <% if lockable? -%>
71
+ locked: Your account is locked. Check your email for unlock instructions.
72
+ <% end -%>
73
+ <% if confirmable? -%>
74
+ unconfirmed: You must confirm your email address before signing in.
75
+ <% end -%>
76
+ <% end -%>
77
+ <% if ott? -%>
78
+ otts:
79
+ create:
80
+ alert:
81
+ rate_limited: Try again later.
82
+ notice: We've emailed you a sign-in code (if a user with that email address exists).
83
+ update:
84
+ alert:
85
+ incorrect_code: Incorrect code. Try again.
86
+ invalid_code: Your sign-in code is invalid or has expired. Request a new one.
87
+ <% if invitable? -%>
88
+ invitation_pending: You must accept your invitation before signing in.
89
+ <% end -%>
90
+ <% if lockable? -%>
91
+ locked: Your account is locked. Check your email for unlock instructions.
92
+ <% end -%>
93
+ rate_limited: Try again later.
94
+ too_many_attempts: Too many incorrect attempts. Request a new code.
95
+ <% if confirmable? -%>
96
+ unconfirmed: You must confirm your email address before signing in.
97
+ <% end -%>
98
+ <% end -%>
99
+ <% if recoverable? -%>
100
+ passwords:
101
+ create:
102
+ alert:
103
+ rate_limited: Try again later.
104
+ notice: Password reset instructions sent (if user with that email address exists).
105
+ edit:
106
+ alert:
107
+ invalid_token: Password reset link is invalid or has expired.
108
+ update:
109
+ alert:
110
+ invalid_token: Password reset link is invalid or has expired.
111
+ password_blank: Enter a new password.
112
+ password_mismatch: Passwords did not match.
113
+ notice: Password has been reset.
114
+ <% end -%>
115
+ <% if registerable? -%>
116
+ registrations:
117
+ create:
118
+ <% if confirmable? -%>
119
+ notice: Welcome! Check your email to confirm your account.
120
+ <% else -%>
121
+ notice: Welcome! You have signed up successfully.
122
+ <% end -%>
123
+ destroy:
124
+ notice: Your account has been deleted.
125
+ update:
126
+ notice: Your account has been updated.
127
+ <% end -%>
128
+ sessions:
129
+ create:
130
+ alert:
131
+ invalid: Try another email address or password.
132
+ <% if invitable? -%>
133
+ invitation_pending: You must accept your invitation before signing in.
134
+ <% end -%>
135
+ <% if lockable? -%>
136
+ locked: Your account is locked. Check your email for unlock instructions.
137
+ <% end -%>
138
+ rate_limited: Try again later.
139
+ <% if confirmable? -%>
140
+ unconfirmed: You must confirm your email address before signing in.
141
+ <% end -%>
142
+ destroy:
143
+ notice: You have been signed out.
144
+ <% if lockable? -%>
145
+ unlocks:
146
+ create:
147
+ alert:
148
+ rate_limited: Try again later.
149
+ notice: Unlock instructions sent (if user with that email address exists and is locked).
150
+ show:
151
+ alert:
152
+ invalid_token: Unlock link is invalid or has expired.
153
+ notice: Your account has been unlocked. Please sign in.
154
+ <% end -%>
155
+ <% if passkey? -%>
156
+ webauthn_credentials:
157
+ destroy:
158
+ notice: Passkey removed.
159
+ <% end -%>
160
+ <% if invitable? -%>
161
+ invitations:
162
+ edit:
163
+ form:
164
+ button:
165
+ submit: Set my password
166
+ input:
167
+ password:
168
+ placeholder: Choose a password
169
+ password_confirmation:
170
+ placeholder: Repeat the password
171
+ heading: Accept your invitation
172
+ new:
173
+ form:
174
+ button:
175
+ submit: Send invitation
176
+ input:
177
+ email:
178
+ placeholder: Enter your email address
179
+ heading: Invite someone
180
+ <% end -%>
181
+ <% if invitable? -%>
182
+ invitations_mailer:
183
+ invitation_instructions:
184
+ activate_on: You have been invited. Set your password and activate your account on
185
+ expire_in: This link will expire in %{ttl}.
186
+ invitation_page: this invitation page
187
+ subject: You have been invited
188
+ <% end -%>
189
+ <% if passkey? -%>
190
+ json:
191
+ passkey_sessions:
192
+ create:
193
+ alert:
194
+ <% if invitable? -%>
195
+ invitation_pending: You must accept your invitation before signing in.
196
+ <% end -%>
197
+ <% if lockable? -%>
198
+ locked: Your account is locked. Check your email for unlock instructions.
199
+ <% end -%>
200
+ not_recognized: Passkey not recognized.
201
+ rate_limited: Try again later.
202
+ <% if confirmable? -%>
203
+ unconfirmed: You must confirm your email address before signing in.
204
+ <% end -%>
205
+ verification_failed: Passkey verification failed.
206
+ webauthn_credentials:
207
+ create:
208
+ alert:
209
+ save_failed: Could not save passkey.
210
+ <% end -%>
211
+ <% if magic_link? -%>
212
+ magic_links:
213
+ new:
214
+ form:
215
+ button:
216
+ submit: Email me a sign-in link
217
+ input:
218
+ email:
219
+ placeholder: Enter your email address
220
+ heading: Sign in with magic link
221
+ links:
222
+ session: Sign in with password
223
+ <% end -%>
224
+ <% if magic_link? -%>
225
+ magic_links_mailer:
226
+ magic_link:
227
+ expire_in: This link will expire in %{ttl} and can only be used once.
228
+ magic_link_page: this sign-in link
229
+ sign_in_on: You can sign in to your account by following
230
+ subject: Your sign-in link
231
+ <% end -%>
232
+ <% if ott? -%>
233
+ otts:
234
+ edit:
235
+ buttons:
236
+ resend: Resend code
237
+ emailed_code_to: We emailed a %{digit_count}-digit code to %{email}.
238
+ expires_in: It expires in %{expires_in}.
239
+ form:
240
+ button:
241
+ submit: Sign in
242
+ input:
243
+ digit:
244
+ aria: Digit %{digit}
245
+ <% if rememberable? -%>
246
+ remember:
247
+ label: Remember me
248
+ <% end -%>
249
+ heading: Enter your sign-in code
250
+ <% end -%>
251
+ <% if ott? -%>
252
+ otts_mailer:
253
+ ott:
254
+ expire_in: This code will expire in %{ttl} and can only be used once.
255
+ ignore: If you didn't request it, you can ignore this email.
256
+ sign_in_code: 'Your sign-in code is:'
257
+ subject: Your sign-in code
258
+ <% end -%>
259
+ <% if recoverable? -%>
260
+ passwords:
261
+ edit:
262
+ form:
263
+ button:
264
+ submit: Save
265
+ input:
266
+ password:
267
+ placeholder: Enter new password
268
+ password_confirmation:
269
+ placeholder: Repeat new password
270
+ heading: Update your password
271
+ new:
272
+ form:
273
+ button:
274
+ submit: Email reset instructions
275
+ input:
276
+ email:
277
+ placeholder: Enter your email address
278
+ heading: Forgot your password?
279
+ <% end -%>
280
+ <% if recoverable? -%>
281
+ passwords_mailer:
282
+ reset:
283
+ expire_in: This link will expire in %{ttl}.
284
+ reset_on: You can reset your password on
285
+ reset_page: this password reset page
286
+ subject: Reset your password
287
+ <% end -%>
288
+ <% if registerable? -%>
289
+ registrations:
290
+ edit:
291
+ confirmation:
292
+ delete: Are you sure?
293
+ form:
294
+ button:
295
+ submit: Update
296
+ input:
297
+ password:
298
+ placeholder: New password (leave blank to keep current)
299
+ password_confirmation:
300
+ placeholder: Repeat new password
301
+ heading: Your account
302
+ links:
303
+ delete: Delete my account
304
+ <% if passkey? -%>
305
+ passkeys: Manage your passkeys
306
+ <% end -%>
307
+ new:
308
+ form:
309
+ button:
310
+ submit: Sign up
311
+ input:
312
+ email:
313
+ placeholder: Enter your email address
314
+ password:
315
+ placeholder: Enter a password
316
+ password_confirmation:
317
+ placeholder: Repeat the password
318
+ heading: Sign up
319
+ links:
320
+ sign_in: Sign in
321
+ <% end -%>
322
+ sessions:
323
+ new:
324
+ <% if passkey? -%>
325
+ error:
326
+ cancelled: Passkey sign-in was cancelled or timed out.
327
+ passkey: Could not sign in with passkey.
328
+ <% end -%>
329
+ links:
330
+ forgot_password: Forgot password?
331
+ <% if magic_link? -%>
332
+ magic_link: Sign in with magic link
333
+ <% end -%>
334
+ <% if ott? -%>
335
+ ott: Sign in with a one-time code instead
336
+ <% end -%>
337
+ <% if passkey? -%>
338
+ passkey: Sign in with a passkey
339
+ <% end -%>
340
+ <% if confirmable? -%>
341
+ resend_confirmation: Resend confirmation instructions
342
+ <% end -%>
343
+ <% if lockable? -%>
344
+ resend_unlock: Resend unlock instructions
345
+ <% end -%>
346
+ <% if ott? -%>
347
+ session: Sign in with password instead
348
+ <% end -%>
349
+ <% if registerable? -%>
350
+ sign_up: Sign up
351
+ <% end -%>
352
+ <% if ott? -%>
353
+ ott:
354
+ form:
355
+ button:
356
+ submit: Email me a sign-in code
357
+ input:
358
+ email:
359
+ placeholder: Enter your email address
360
+ <% end -%>
361
+ session:
362
+ form:
363
+ button:
364
+ submit: Sign in
365
+ input:
366
+ email:
367
+ placeholder: Enter your email address
368
+ password:
369
+ placeholder: Enter your password
370
+ <% if rememberable? -%>
371
+ remember:
372
+ label: Remember me
373
+ <% end -%>
374
+ <% if lockable? -%>
375
+ unlocks:
376
+ new:
377
+ form:
378
+ button:
379
+ submit: Resend unlock instructions
380
+ input:
381
+ email:
382
+ placeholder: Enter your email address
383
+ heading: Resend unlock instructions
384
+ <% end -%>
385
+ <% if lockable? -%>
386
+ unlocks_mailer:
387
+ unlock_instructions:
388
+ attempts: Your account has been locked due to too many failed sign-in attempts.
389
+ or_wait: or wait %{ttl} for the lock to expire on its own.
390
+ subject: Unlock your account
391
+ unlock_on: You can unlock it now on
392
+ unlock_page: this unlock page
393
+ <% end -%>
394
+ <% if passkey? -%>
395
+ webauthn_credentials:
396
+ create:
397
+ default_nickname: Passkey
398
+ index:
399
+ account_added: "%{nickname} - added %{date_added}"
400
+ buttons:
401
+ remove: Remove
402
+ confirmations:
403
+ remove: Remove this passkey?
404
+ heading: Your passkeys
405
+ links:
406
+ add: Add a passkey
407
+ none: You haven't added a passkey yet.
408
+ new:
409
+ error:
410
+ already_registered: This device already has a passkey for your account.
411
+ cancelled: Passkey creation was cancelled or timed out.
412
+ save: Could not save passkey.
413
+ form:
414
+ button:
415
+ submit: Create passkey
416
+ input:
417
+ nickname:
418
+ label: Name this passkey (e.g. MacBook or iPhone)
419
+ placeholder: Passkey
420
+ heading: Add a passkey
421
+ <% end -%>
@@ -0,0 +1,5 @@
1
+ class AddRememberableToSessions < ActiveRecord::Migration<%= migration_version %>
2
+ def change
3
+ add_column :sessions, :remembered_at, :datetime
4
+ end
5
+ end
@@ -0,0 +1,11 @@
1
+ class RemoveRememberCreatedAtFromUsers < ActiveRecord::Migration<%= migration_version %>
2
+ # "Remember me" moved from users to sessions (see add_rememberable_to_sessions). Apps generated
3
+ # before that have this column; new apps don't, so it's a no-op for them.
4
+ def up
5
+ remove_column :users, :remember_created_at if column_exists?(:users, :remember_created_at)
6
+ end
7
+
8
+ def down
9
+ add_column :users, :remember_created_at, :datetime unless column_exists?(:users, :remember_created_at)
10
+ end
11
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsAuthentication
4
- VERSION = "0.5.0"
4
+ VERSION = "0.7.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_authentication
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Freerksen
@@ -70,10 +70,10 @@ files:
70
70
  - lib/generators/authentication/templates/app/models/concerns/ott_concern.rb.tt
71
71
  - lib/generators/authentication/templates/app/models/concerns/passkey_concern.rb.tt
72
72
  - lib/generators/authentication/templates/app/models/concerns/recoverable_concern.rb.tt
73
- - lib/generators/authentication/templates/app/models/concerns/rememberable_concern.rb.tt
74
73
  - lib/generators/authentication/templates/app/models/concerns/timeoutable_concern.rb.tt
75
74
  - lib/generators/authentication/templates/app/models/concerns/trackable_concern.rb.tt
76
75
  - lib/generators/authentication/templates/app/models/concerns/validatable_concern.rb.tt
76
+ - lib/generators/authentication/templates/app/models/session.rb.tt
77
77
  - lib/generators/authentication/templates/app/models/user_auth.rb.tt
78
78
  - lib/generators/authentication/templates/app/models/webauthn_credential.rb.tt
79
79
  - lib/generators/authentication/templates/app/views/confirmations/new.html.erb.tt
@@ -89,6 +89,8 @@ files:
89
89
  - lib/generators/authentication/templates/app/views/otts/edit.html.erb.tt
90
90
  - lib/generators/authentication/templates/app/views/otts_mailer/ott.html.erb.tt
91
91
  - lib/generators/authentication/templates/app/views/otts_mailer/ott.text.erb.tt
92
+ - lib/generators/authentication/templates/app/views/passwords/edit.html.erb.tt
93
+ - lib/generators/authentication/templates/app/views/passwords/new.html.erb.tt
92
94
  - lib/generators/authentication/templates/app/views/passwords_mailer/reset.html.erb.tt
93
95
  - lib/generators/authentication/templates/app/views/passwords_mailer/reset.text.erb.tt
94
96
  - lib/generators/authentication/templates/app/views/registrations/edit.html.erb.tt
@@ -100,16 +102,18 @@ files:
100
102
  - lib/generators/authentication/templates/app/views/webauthn_credentials/index.html.erb.tt
101
103
  - lib/generators/authentication/templates/app/views/webauthn_credentials/new.html.erb.tt
102
104
  - lib/generators/authentication/templates/config/initializers/webauthn.rb.tt
105
+ - lib/generators/authentication/templates/config/locales/authentication.en.yml.tt
103
106
  - lib/generators/authentication/templates/db/migrate/add_confirmable_to_users.rb.tt
104
107
  - lib/generators/authentication/templates/db/migrate/add_invitable_to_users.rb.tt
105
108
  - lib/generators/authentication/templates/db/migrate/add_lockable_to_users.rb.tt
106
109
  - lib/generators/authentication/templates/db/migrate/add_magic_link_to_users.rb.tt
107
110
  - lib/generators/authentication/templates/db/migrate/add_ott_to_users.rb.tt
108
111
  - lib/generators/authentication/templates/db/migrate/add_recoverable_to_users.rb.tt
109
- - lib/generators/authentication/templates/db/migrate/add_rememberable_to_users.rb.tt
112
+ - lib/generators/authentication/templates/db/migrate/add_rememberable_to_sessions.rb.tt
110
113
  - lib/generators/authentication/templates/db/migrate/add_webauthn_id_to_users.rb.tt
111
114
  - lib/generators/authentication/templates/db/migrate/create_user_auths.rb.tt
112
115
  - lib/generators/authentication/templates/db/migrate/create_webauthn_credentials.rb.tt
116
+ - lib/generators/authentication/templates/db/migrate/remove_remember_created_at_from_users.rb.tt
113
117
  - lib/rails_authentication.rb
114
118
  - lib/rails_authentication/version.rb
115
119
  homepage: https://github.com/dfreerksen/rails_authentication
@@ -118,6 +122,7 @@ licenses:
118
122
  metadata:
119
123
  homepage_uri: https://github.com/dfreerksen/rails_authentication
120
124
  source_code_uri: https://github.com/dfreerksen/rails_authentication
125
+ rubygems_mfa_required: 'true'
121
126
  rdoc_options: []
122
127
  require_paths:
123
128
  - lib
@@ -132,7 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
137
  - !ruby/object:Gem::Version
133
138
  version: '0'
134
139
  requirements: []
135
- rubygems_version: 4.0.16
140
+ rubygems_version: 4.0.20
136
141
  specification_version: 4
137
142
  summary: Devise-style features on top of Rails 8's built-in authentication generator
138
143
  test_files: []
@@ -1,15 +0,0 @@
1
- module RememberableConcern
2
- extend ActiveSupport::Concern
3
-
4
- def remembered?
5
- remember_created_at.present?
6
- end
7
-
8
- def remember_me!
9
- update!(remember_created_at: Time.current)
10
- end
11
-
12
- def forget_me!
13
- update!(remember_created_at: nil) if remember_created_at.present?
14
- end
15
- end
@@ -1,5 +0,0 @@
1
- class AddRememberableToUsers < ActiveRecord::Migration<%= migration_version %>
2
- def change
3
- add_column :users, :remember_created_at, :datetime
4
- end
5
- end