diff --git a/app/models/user.rb b/app/models/user.rb
index 20697d0cd..959ba4dd1 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -56,6 +56,10 @@ def active_for_authentication?
!deleted_at?
end
+ def remember_me
+ true
+ end
+
def initials
[first_name.first, last_name.first].join.upcase
end
diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb
index cc8ebf7a0..ce49d921b 100644
--- a/app/views/devise/sessions/new.html.erb
+++ b/app/views/devise/sessions/new.html.erb
@@ -10,14 +10,6 @@
<%= f.label :password, class: 'label' %>
<%= f.password_field :password, autocomplete: 'current-password', class: 'base-input' %>
- <% if devise_mapping.rememberable? %>
-
- <%= f.label :remember_me, class: 'flex items-center cursor-pointer' do %>
- <%= f.check_box :remember_me, checked: true, class: 'base-checkbox' %>
- Remember me
- <% end %>
-
- <% end %>
<%= f.button button_title(title: 'Log In', disabled_with: 'Logging In'), class: 'base-button' %>
diff --git a/config/initializers/devise.rb b/config/initializers/devise.rb
index 8988a79c5..6bf18a0aa 100644
--- a/config/initializers/devise.rb
+++ b/config/initializers/devise.rb
@@ -159,7 +159,7 @@
# ==> Configuration for :rememberable
# The time the user will be remembered without asking for credentials again.
- # config.remember_for = 2.weeks
+ config.remember_for = 2.years
# Invalidates all the remember me tokens when the user signs out.
config.expire_all_remember_me_on_sign_out = true