Clearance.configure do |config|
  config.allow_sign_up = (ENV['DISABLE_SIGNUP'].to_s == 'true') ? false : true
  config.mailer_sender = "RubyGems.org <no-reply@mailer.rubygems.org>"
  config.secure_cookie = true unless Rails.env.test? || Rails.env.development?
  config.password_strategy = Clearance::PasswordStrategies::BCryptMigrationFromSHA1
  config.sign_in_guards = [ConfirmedUserGuard]
  config.rotate_csrf_on_sign_in = true
end

Clearance.configure do |config|
  config.allow_sign_up = (ENV['DISABLE_SIGNUP'].to_s == 'true') ? false : true
  config.mailer_sender = "RubyGems.org <no-reply@mailer.rubygems.org>"
  config.secure_cookie = true unless Rails.env.test? || Rails.env.development?
  config.password_strategy = Clearance::PasswordStrategies::BCryptMigrationFromSHA1
  config.sign_in_guards = [ConfirmedUserGuard]
  config.rotate_csrf_on_sign_in = true
  config.cookie_expiration = ->(_cookies) { 2.weeks.from_now.utc }
end

Expire remember_token cookie after 2 weeks
Expire remember_token cookie after 2 weeks

Default expiration time is one year, which is too long.
https://github.com/thoughtbot/clearance/blob/5d29439ee4340738eacc8d5cd8bfbbb10a576f38/lib/clearance/configuration.rb#L25
