add devise log

pull/257/head
Pete Matsyburka 2 years ago
parent 16a77d3536
commit fefd138dfd

@ -7,6 +7,8 @@ class SessionsController < Devise::SessionsController
email = sign_in_params[:email].to_s.downcase email = sign_in_params[:email].to_s.downcase
if Docuseal.multitenant? && !User.exists?(email:) if Docuseal.multitenant? && !User.exists?(email:)
Rollbar.warning('Sign in new user') if defined?(Rollbar)
return redirect_to new_registration_path(sign_up: true, user: sign_in_params.slice(:email)), return redirect_to new_registration_path(sign_up: true, user: sign_in_params.slice(:email)),
notice: 'Create a new account' notice: 'Create a new account'
end end

@ -2,6 +2,14 @@
Devise.otp_allowed_drift = 60.seconds Devise.otp_allowed_drift = 60.seconds
class FailureApp < Devise::FailureApp
def respond
Rollbar.warning('Invalid password') if defined?(Rollbar) && warden_message == :invalid
super
end
end
# Assuming you have not yet modified this file, each configuration option below # Assuming you have not yet modified this file, each configuration option below
# is set to its default value. Note that some are commented out while others # is set to its default value. Note that some are commented out while others
# are not: uncommented lines are intended to protect your configuration from # are not: uncommented lines are intended to protect your configuration from
@ -277,6 +285,7 @@ Devise.setup do |config|
config.warden do |manager| config.warden do |manager|
# manager.intercept_401 = false # manager.intercept_401 = false
# manager.default_strategies(scope: :user).unshift(:auth_token) # manager.default_strategies(scope: :user).unshift(:auth_token)
manager.failure_app = FailureApp
end end
# ==> Mountable engine configurations # ==> Mountable engine configurations

Loading…
Cancel
Save