Revert "Allow unconfirmed access for 3 days when OmniAuth sign up"
This reverts commit 1eac19662f
.
This commit is contained in:
parent
1eac19662f
commit
623aff5f94
|
@ -1,8 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class User < ApplicationRecord
|
||||
ALLOW_UNCONFIRMED_OMNIAUTH_ACCESS_FOR = 3.days
|
||||
|
||||
devise(
|
||||
:confirmable,
|
||||
:database_authenticatable,
|
||||
|
@ -26,13 +24,4 @@ class User < ApplicationRecord
|
|||
before_validation do
|
||||
self.account ||= Account.new
|
||||
end
|
||||
|
||||
def confirmation_period_valid?
|
||||
return if user_omniauths.where(email: email).exists? &&
|
||||
confirmation_sent_at &&
|
||||
confirmation_sent_at.utc >=
|
||||
ALLOW_UNCONFIRMED_OMNIAUTH_ACCESS_FOR.ago
|
||||
|
||||
super
|
||||
end
|
||||
end
|
||||
|
|
Reference in New Issue