quo_vadis 1.4.2 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +11 -7
- data/CHANGELOG.md +43 -0
- data/Gemfile +11 -1
- data/LICENSE.txt +21 -0
- data/README.md +460 -127
- data/Rakefile +15 -9
- data/app/controllers/quo_vadis/confirmations_controller.rb +102 -0
- data/app/controllers/quo_vadis/logs_controller.rb +20 -0
- data/app/controllers/quo_vadis/password_resets_controller.rb +68 -0
- data/app/controllers/quo_vadis/passwords_controller.rb +28 -0
- data/app/controllers/quo_vadis/recovery_codes_controller.rb +54 -0
- data/app/controllers/quo_vadis/sessions_controller.rb +50 -132
- data/app/controllers/quo_vadis/totps_controller.rb +72 -0
- data/app/controllers/quo_vadis/twofas_controller.rb +26 -0
- data/app/mailers/quo_vadis/mailer.rb +73 -0
- data/app/models/quo_vadis/account.rb +72 -0
- data/app/models/quo_vadis/account_confirmation_token.rb +17 -0
- data/app/models/quo_vadis/log.rb +59 -0
- data/app/models/quo_vadis/password.rb +68 -0
- data/app/models/quo_vadis/password_reset_token.rb +17 -0
- data/app/models/quo_vadis/recovery_code.rb +26 -0
- data/app/models/quo_vadis/session.rb +55 -0
- data/app/models/quo_vadis/token.rb +42 -0
- data/app/models/quo_vadis/totp.rb +56 -0
- data/app/views/quo_vadis/confirmations/edit.html.erb +10 -0
- data/app/views/quo_vadis/confirmations/edit_email.html.erb +14 -0
- data/app/views/quo_vadis/confirmations/index.html.erb +14 -0
- data/app/views/quo_vadis/confirmations/new.html.erb +16 -0
- data/app/views/quo_vadis/logs/index.html.erb +30 -0
- data/app/views/quo_vadis/mailer/account_confirmation.text.erb +4 -0
- data/app/views/quo_vadis/mailer/email_change_notification.text.erb +8 -0
- data/app/views/quo_vadis/mailer/identifier_change_notification.text.erb +8 -0
- data/app/views/quo_vadis/mailer/password_change_notification.text.erb +8 -0
- data/app/views/quo_vadis/mailer/password_reset_notification.text.erb +8 -0
- data/app/views/quo_vadis/mailer/recovery_codes_generation_notification.text.erb +8 -0
- data/app/views/quo_vadis/mailer/reset_password.text.erb +4 -0
- data/app/views/quo_vadis/mailer/totp_reuse_notification.text.erb +6 -0
- data/app/views/quo_vadis/mailer/totp_setup_notification.text.erb +8 -0
- data/app/views/quo_vadis/mailer/twofa_deactivated_notification.text.erb +8 -0
- data/app/views/quo_vadis/password_resets/edit.html.erb +17 -0
- data/app/views/quo_vadis/password_resets/index.html.erb +5 -0
- data/app/views/quo_vadis/password_resets/new.html.erb +12 -0
- data/app/views/quo_vadis/passwords/edit.html.erb +22 -0
- data/app/views/quo_vadis/recovery_codes/challenge.html.erb +11 -0
- data/app/views/quo_vadis/recovery_codes/index.html.erb +25 -0
- data/app/views/quo_vadis/sessions/index.html.erb +26 -0
- data/app/views/quo_vadis/sessions/new.html.erb +24 -0
- data/app/views/quo_vadis/totps/challenge.html.erb +11 -0
- data/app/views/quo_vadis/totps/new.html.erb +17 -0
- data/app/views/quo_vadis/twofas/show.html.erb +20 -0
- data/bin/console +15 -0
- data/bin/rails +21 -0
- data/bin/setup +8 -0
- data/config/locales/quo_vadis.en.yml +80 -24
- data/config/routes.rb +46 -12
- data/db/migrate/202102150904_setup.rb +48 -0
- data/lib/generators/quo_vadis/install_generator.rb +4 -23
- data/lib/quo_vadis.rb +103 -97
- data/lib/quo_vadis/controller.rb +227 -0
- data/lib/quo_vadis/crypt.rb +43 -0
- data/lib/quo_vadis/current_request_details.rb +11 -0
- data/lib/quo_vadis/defaults.rb +18 -0
- data/lib/quo_vadis/encrypted_type.rb +17 -0
- data/lib/quo_vadis/engine.rb +9 -11
- data/lib/quo_vadis/hmacable.rb +26 -0
- data/lib/quo_vadis/ip_masking.rb +31 -0
- data/lib/quo_vadis/model.rb +83 -0
- data/lib/quo_vadis/version.rb +3 -1
- data/quo_vadis.gemspec +20 -25
- data/test/dummy/README.markdown +1 -0
- data/test/dummy/Rakefile +2 -6
- data/test/dummy/app/controllers/application_controller.rb +0 -1
- data/test/dummy/app/controllers/articles_controller.rb +8 -11
- data/test/dummy/app/controllers/sign_ups_controller.rb +42 -0
- data/test/dummy/app/controllers/users_controller.rb +13 -5
- data/test/dummy/app/models/application_record.rb +3 -0
- data/test/dummy/app/models/article.rb +2 -1
- data/test/dummy/app/models/person.rb +5 -2
- data/test/dummy/app/models/user.rb +4 -1
- data/test/dummy/app/views/articles/also_secret.html.erb +1 -0
- data/test/dummy/app/views/articles/index.html.erb +1 -1
- data/test/dummy/app/views/articles/secret.html.erb +1 -0
- data/test/dummy/app/views/articles/very_secret.html.erb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +41 -25
- data/test/dummy/app/views/sign_ups/new.html.erb +37 -0
- data/test/dummy/app/views/sign_ups/show.html.erb +5 -0
- data/test/dummy/app/views/users/new.html.erb +32 -9
- data/test/dummy/config.ru +6 -3
- data/test/dummy/config/application.rb +18 -9
- data/test/dummy/config/boot.rb +3 -9
- data/test/dummy/config/database.yml +2 -14
- data/test/dummy/config/environment.rb +2 -3
- data/test/dummy/config/initializers/quo_vadis.rb +2 -76
- data/test/dummy/config/routes.rb +11 -3
- data/test/dummy/db/migrate/202102121932_create_users.rb +10 -0
- data/test/dummy/db/migrate/202102121935_create_people.rb +10 -0
- data/test/dummy/db/schema.rb +80 -21
- data/test/fixtures/quo_vadis/mailer/account_confirmation.text +4 -0
- data/test/fixtures/quo_vadis/mailer/email_change_notification.text +8 -0
- data/test/fixtures/quo_vadis/mailer/identifier_change_notification.text +8 -0
- data/test/fixtures/quo_vadis/mailer/password_change_notification.text +8 -0
- data/test/fixtures/quo_vadis/mailer/password_reset_notification.text +8 -0
- data/test/fixtures/quo_vadis/mailer/recovery_codes_generation_notification.text +8 -0
- data/test/fixtures/quo_vadis/mailer/reset_password.text +4 -0
- data/test/fixtures/quo_vadis/mailer/totp_reuse_notification.text +6 -0
- data/test/fixtures/quo_vadis/mailer/totp_setup_notification.text +8 -0
- data/test/fixtures/quo_vadis/mailer/twofa_deactivated_notification.text +8 -0
- data/test/integration/account_confirmation_test.rb +145 -0
- data/test/integration/controller_test.rb +280 -0
- data/test/integration/logging_test.rb +244 -0
- data/test/integration/password_change_test.rb +99 -0
- data/test/integration/password_login_test.rb +137 -0
- data/test/integration/password_reset_test.rb +136 -0
- data/test/integration/recovery_codes_test.rb +48 -0
- data/test/integration/sessions_test.rb +86 -0
- data/test/integration/sign_up_test.rb +26 -12
- data/test/integration/totps_test.rb +96 -0
- data/test/integration/twofa_test.rb +82 -0
- data/test/mailers/mailer_test.rb +200 -0
- data/test/models/account_test.rb +50 -0
- data/test/models/crypt_test.rb +22 -0
- data/test/models/log_test.rb +16 -0
- data/test/models/mask_ip_test.rb +27 -0
- data/test/models/model_test.rb +66 -0
- data/test/models/password_test.rb +179 -0
- data/test/models/recovery_code_test.rb +54 -0
- data/test/models/session_test.rb +67 -0
- data/test/models/token_test.rb +70 -0
- data/test/models/totp_test.rb +68 -0
- data/test/quo_vadis_test.rb +39 -3
- data/test/test_helper.rb +42 -70
- metadata +120 -204
- data/app/controllers/controller_mixin.rb +0 -109
- data/app/mailers/quo_vadis/notifier.rb +0 -30
- data/app/models/model_mixin.rb +0 -128
- data/lib/generators/quo_vadis/templates/migration.rb.erb +0 -18
- data/lib/generators/quo_vadis/templates/quo_vadis.rb.erb +0 -96
- data/test/dummy/.gitignore +0 -2
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/app/helpers/articles_helper.rb +0 -2
- data/test/dummy/app/views/articles/new.html.erb +0 -11
- data/test/dummy/app/views/layouts/sessions.html.erb +0 -3
- data/test/dummy/app/views/quo_vadis/notifier/change_password.text.erb +0 -9
- data/test/dummy/app/views/quo_vadis/notifier/invite.text.erb +0 -8
- data/test/dummy/app/views/sessions/edit.html.erb +0 -11
- data/test/dummy/app/views/sessions/forgotten.html.erb +0 -13
- data/test/dummy/app/views/sessions/invite.html.erb +0 -31
- data/test/dummy/app/views/sessions/new.html.erb +0 -15
- data/test/dummy/config/environments/development.rb +0 -26
- data/test/dummy/config/environments/production.rb +0 -49
- data/test/dummy/config/environments/test.rb +0 -37
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/test/dummy/config/initializers/inflections.rb +0 -10
- data/test/dummy/config/initializers/mime_types.rb +0 -5
- data/test/dummy/config/initializers/rack_patch.rb +0 -16
- data/test/dummy/config/initializers/secret_token.rb +0 -7
- data/test/dummy/config/initializers/session_store.rb +0 -8
- data/test/dummy/config/locales/en.yml +0 -5
- data/test/dummy/config/locales/quo_vadis.en.yml +0 -21
- data/test/dummy/db/migrate/20110124125037_create_users.rb +0 -13
- data/test/dummy/db/migrate/20110124131535_create_articles.rb +0 -14
- data/test/dummy/db/migrate/20110127094709_add_authentication_to_users.rb +0 -18
- data/test/dummy/db/migrate/20111004112209_create_people.rb +0 -13
- data/test/dummy/db/migrate/20111004132342_add_authentication_to_people.rb +0 -18
- data/test/dummy/public/404.html +0 -26
- data/test/dummy/public/422.html +0 -26
- data/test/dummy/public/500.html +0 -26
- data/test/dummy/public/javascripts/application.js +0 -2
- data/test/dummy/public/javascripts/controls.js +0 -965
- data/test/dummy/public/javascripts/dragdrop.js +0 -974
- data/test/dummy/public/javascripts/effects.js +0 -1123
- data/test/dummy/public/javascripts/prototype.js +0 -6001
- data/test/dummy/public/javascripts/rails.js +0 -175
- data/test/dummy/public/stylesheets/.gitkeep +0 -0
- data/test/dummy/script/rails +0 -6
- data/test/integration/activation_test.rb +0 -108
- data/test/integration/authenticate_test.rb +0 -39
- data/test/integration/blocked_test.rb +0 -23
- data/test/integration/config_test.rb +0 -118
- data/test/integration/cookie_test.rb +0 -67
- data/test/integration/csrf_test.rb +0 -41
- data/test/integration/forgotten_test.rb +0 -93
- data/test/integration/helper_test.rb +0 -18
- data/test/integration/locale_test.rb +0 -197
- data/test/integration/navigation_test.rb +0 -7
- data/test/integration/sign_in_person_test.rb +0 -26
- data/test/integration/sign_in_test.rb +0 -24
- data/test/integration/sign_out_test.rb +0 -20
- data/test/support/integration_case.rb +0 -11
- data/test/unit/user_test.rb +0 -75
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module QuoVadis
|
4
|
+
class Token
|
5
|
+
extend Hmacable
|
6
|
+
|
7
|
+
class << self
|
8
|
+
|
9
|
+
def generate(account)
|
10
|
+
public_data = "#{account.id}-#{expires_at}"
|
11
|
+
data = data_for_hmac public_data, account
|
12
|
+
"#{public_data}--#{compute_hmac(data)}"
|
13
|
+
end
|
14
|
+
|
15
|
+
def find_account(token)
|
16
|
+
provided_public_data, provided_hmac = token.split '--'
|
17
|
+
id, expires_at = provided_public_data.split '-'
|
18
|
+
account = Account.find id
|
19
|
+
data = data_for_hmac provided_public_data, account
|
20
|
+
actual_hmac = compute_hmac data
|
21
|
+
return nil unless timing_safe_eql? provided_hmac, actual_hmac
|
22
|
+
return nil if expires_at.to_i < Time.current.to_i
|
23
|
+
account
|
24
|
+
rescue
|
25
|
+
nil
|
26
|
+
end
|
27
|
+
|
28
|
+
private
|
29
|
+
|
30
|
+
attr_reader :account
|
31
|
+
|
32
|
+
def expires_at
|
33
|
+
raise NotImplementedError
|
34
|
+
end
|
35
|
+
|
36
|
+
def data_for_hmac(public_data, account)
|
37
|
+
raise NotImplementedError
|
38
|
+
end
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'rotp'
|
4
|
+
require 'rqrcode'
|
5
|
+
|
6
|
+
module QuoVadis
|
7
|
+
class Totp < ActiveRecord::Base
|
8
|
+
extend Hmacable
|
9
|
+
|
10
|
+
attribute :key, :qv_encrypted, default: -> { ROTP::Base32.random }
|
11
|
+
attribute :hmac_key, :string
|
12
|
+
attribute :provided_hmac_key, :string
|
13
|
+
|
14
|
+
belongs_to :account
|
15
|
+
|
16
|
+
validate :key_not_tampered_with, if: -> { provided_hmac_key.present? }
|
17
|
+
validates :key, presence: true
|
18
|
+
|
19
|
+
|
20
|
+
def qr_code
|
21
|
+
RQRCode::QRCode.new(
|
22
|
+
ROTP::TOTP.new(key, issuer: QuoVadis.app_name).provisioning_uri(account.identifier)
|
23
|
+
)
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
def hmac_key
|
28
|
+
self.class.compute_hmac key
|
29
|
+
end
|
30
|
+
|
31
|
+
|
32
|
+
# Returns true and saves the record if `otp` is valid, false otherwise.
|
33
|
+
def verify(otp)
|
34
|
+
if (_last_used_at = ROTP::TOTP.new(key).verify otp, after: last_used_at)
|
35
|
+
self.last_used_at = _last_used_at
|
36
|
+
save
|
37
|
+
else
|
38
|
+
false
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
|
43
|
+
def reused?(otp)
|
44
|
+
totp = ROTP::TOTP.new key
|
45
|
+
!totp.verify(otp, after: last_used_at) && totp.verify(otp)
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
private
|
50
|
+
|
51
|
+
def key_not_tampered_with
|
52
|
+
errors.add :key, :invalid unless self.class.timing_safe_eql? provided_hmac_key, hmac_key
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<h1>Account confirmation: change email</h1>
|
2
|
+
|
3
|
+
<p>Please update your email address.</p>
|
4
|
+
|
5
|
+
<%= form_with url: update_email_confirmations_path, method: :put do |f| %>
|
6
|
+
<p>
|
7
|
+
<%= f.label :email %>
|
8
|
+
<%= f.text_field :email, value: @email, inputmode: 'email', autocomplete: 'email' %>
|
9
|
+
</p>
|
10
|
+
|
11
|
+
<p>
|
12
|
+
<%= f.submit 'Update my email address and send me a new confirmation email' %>
|
13
|
+
</p>
|
14
|
+
<% end %>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<h1>Account confirmation</h1>
|
2
|
+
|
3
|
+
<% if @account %>
|
4
|
+
<p>We have sent an email to <%= @account.model.email %>.</p>
|
5
|
+
|
6
|
+
<p>Wrong address? <%= link_to 'Change it', edit_email_confirmations_path %>.</p>
|
7
|
+
|
8
|
+
<p>Didn't receive it? <%= button_to 'Get another one', resend_confirmations_path %></p>
|
9
|
+
|
10
|
+
<% else %>
|
11
|
+
<p>We have sent an email to you.</p>
|
12
|
+
|
13
|
+
<p><%= link_to 'Request a new email', new_confirmation_path %></p>
|
14
|
+
<% end %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<h1>Resend confirmation instructions</h1>
|
2
|
+
|
3
|
+
<%# Note that in this example the User identifier is :email. %>
|
4
|
+
|
5
|
+
<p>If you didn't receive the confirmation email, please enter your email address and we'll send you another one.</p>
|
6
|
+
|
7
|
+
<%= form_with url: confirmations_path, method: :post do |f| %>
|
8
|
+
<p>
|
9
|
+
<%= f.label :email %>
|
10
|
+
<%= f.text_field :email, inputmode: 'email', autocomplete: 'email' %>
|
11
|
+
</p>
|
12
|
+
|
13
|
+
<p>
|
14
|
+
<%= f.submit %>
|
15
|
+
</p>
|
16
|
+
<% end %>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<h1>Logs</h1>
|
2
|
+
|
3
|
+
<table>
|
4
|
+
<thead>
|
5
|
+
<tr>
|
6
|
+
<th>Timestamp</th>
|
7
|
+
<th>Action</th>
|
8
|
+
<th>IP</th>
|
9
|
+
<th>Metadata</th>
|
10
|
+
</tr>
|
11
|
+
</thead>
|
12
|
+
<tbody>
|
13
|
+
<% @logs.each do |log| %>
|
14
|
+
<tr>
|
15
|
+
<td><%= log.created_at %></td>
|
16
|
+
<td><%= QuoVadis.translate "log.action.#{log.action}" %></td>
|
17
|
+
<td><%= log.ip %></td>
|
18
|
+
<td><%= log.metadata.empty? ? '' : log.metadata.map {|k,v| "#{k}: #{v}"}.join(', ') %></td>
|
19
|
+
</tr>
|
20
|
+
<% end %>
|
21
|
+
</tbody>
|
22
|
+
</table>
|
23
|
+
|
24
|
+
<% if @prev_page %>
|
25
|
+
<%= link_to 'Newer', logs_path(page: @prev_page) %>
|
26
|
+
<% end %>
|
27
|
+
|
28
|
+
<% if @next_page %>
|
29
|
+
<%= link_to 'Older', logs_path(page: @next_page) %>
|
30
|
+
<% end %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<h1>Reset password</h1>
|
2
|
+
|
3
|
+
<%= form_with model: @password, url: password_reset_path(params[:token]), method: :put do |f| %>
|
4
|
+
<p>
|
5
|
+
<%= f.label :password %>
|
6
|
+
<%= f.password_field :password, autocomplete: 'new-password' %>
|
7
|
+
</p>
|
8
|
+
|
9
|
+
<p>
|
10
|
+
<%= f.label :password_confirmation %>
|
11
|
+
<%= f.password_field :password_confirmation, autocomplete: 'new-password' %>
|
12
|
+
</p>
|
13
|
+
|
14
|
+
<p>
|
15
|
+
<%= f.submit %>
|
16
|
+
</p>
|
17
|
+
<% end %>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
<h1>Change password</h1>
|
2
|
+
|
3
|
+
<%= form_with model: @password, url: password_path, method: :put do |f| %>
|
4
|
+
<p>
|
5
|
+
<%= f.label :password %>
|
6
|
+
<%= f.password_field :password, autocomplete: 'current-password' %>
|
7
|
+
</p>
|
8
|
+
|
9
|
+
<p>
|
10
|
+
<%= f.label :new_password %>
|
11
|
+
<%= f.password_field :new_password, autocomplete: 'new-password' %>
|
12
|
+
</p>
|
13
|
+
|
14
|
+
<p>
|
15
|
+
<%= f.label :new_password_confirmation %>
|
16
|
+
<%= f.password_field :new_password_confirmation, autocomplete: 'new-password' %>
|
17
|
+
</p>
|
18
|
+
|
19
|
+
<p>
|
20
|
+
<%= f.submit %>
|
21
|
+
</p>
|
22
|
+
<% end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<h1>2FA: Recovery code</h1>
|
2
|
+
|
3
|
+
<p>Enter one of your recovery codes:</p>
|
4
|
+
|
5
|
+
<%= form_with url: authenticate_recovery_codes_path, method: :post do |f| %>
|
6
|
+
<%= f.text_field :code, inputmode: 'decimal', autofocus: true, maxlength: '11' %>
|
7
|
+
|
8
|
+
<%= f.submit 'Verify' %>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<p><%= link_to 'Never mind, I want to use my TOTP verification code!', quo_vadis.challenge_totps_path %></p>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<h1>2FA: Recovery codes</h1>
|
2
|
+
|
3
|
+
<p>If you lose your authenticator app, you can use recovery codes instead while you set up a new authenticator app.</p>
|
4
|
+
|
5
|
+
<p>Each code can only be used once.</p>
|
6
|
+
|
7
|
+
<% if @codes.present? %>
|
8
|
+
|
9
|
+
<p>This is the only time these codes can be shown to you! We recommend you print them out and store them somewhere safely – but not next to your 2FA details in your authenticator app.</p>
|
10
|
+
|
11
|
+
<ul>
|
12
|
+
<% @codes.each do |code| %>
|
13
|
+
<li><tt><%= code %></tt></li>
|
14
|
+
<% end %>
|
15
|
+
</ul>
|
16
|
+
|
17
|
+
<% else %>
|
18
|
+
|
19
|
+
<p>You have <%= pluralize @recovery_code_count, 'recovery code' %> left.</p>
|
20
|
+
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
<p>You can generate a fresh set of recovery codes whenever you like.</p>
|
24
|
+
|
25
|
+
<p><%= button_to 'Generate a fresh set of recovery codes', generate_recovery_codes_path %></p>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<h1>Sessions</h1>
|
2
|
+
|
3
|
+
<table>
|
4
|
+
<thead>
|
5
|
+
<tr>
|
6
|
+
<th>IP</th>
|
7
|
+
<th>User agent</th>
|
8
|
+
<th></th>
|
9
|
+
</tr>
|
10
|
+
</thead>
|
11
|
+
<tbody>
|
12
|
+
<% @qv_sessions.each do |sess| %>
|
13
|
+
<tr>
|
14
|
+
<td><%= sess.ip %></td>
|
15
|
+
<td><%= sess.user_agent %></td>
|
16
|
+
<td>
|
17
|
+
<% if sess.id == @qv_session.id %>
|
18
|
+
This session
|
19
|
+
<% else %>
|
20
|
+
<%= button_to 'Log out', quo_vadis.session_path(sess), method: :delete %>
|
21
|
+
<% end %>
|
22
|
+
</td>
|
23
|
+
</tr>
|
24
|
+
<% end %>
|
25
|
+
</tbody>
|
26
|
+
</table>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<h1>Login</h1>
|
2
|
+
|
3
|
+
<%= form_with url: login_path, method: :post do |f| %>
|
4
|
+
<p>
|
5
|
+
<%= f.label :email %>
|
6
|
+
<%= f.text_field :email, inputmode: 'email', autocomplete: 'email' %>
|
7
|
+
</p>
|
8
|
+
|
9
|
+
<p>
|
10
|
+
<%= f.label :password %>
|
11
|
+
<%= f.password_field :password, autocomplete: 'current-password' %>
|
12
|
+
</p>
|
13
|
+
|
14
|
+
<p>
|
15
|
+
<%= f.label :remember %>
|
16
|
+
<%= f.check_box :remember %>
|
17
|
+
</p>
|
18
|
+
|
19
|
+
<p>
|
20
|
+
<%= f.submit %>
|
21
|
+
</p>
|
22
|
+
<% end %>
|
23
|
+
|
24
|
+
<%= link_to 'I forgot my password', new_password_reset_path %>
|