Module: PagesCore::AuthenticableUser::ClassMethods

Defined in:
app/models/concerns/pages_core/authenticable_user.rb

Instance Method Summary collapse

Instance Method Details

#authenticate(email, password:) ⇒ Object



25
26
27
# File 'app/models/concerns/pages_core/authenticable_user.rb', line 25

def authenticate(email, password:)
  User.find_by(email:).try(:authenticate, password)
end

#random_session_tokenObject



29
30
31
# File 'app/models/concerns/pages_core/authenticable_user.rb', line 29

def random_session_token
  SecureRandom.hex(32)
end