Add logging info in case sign in fails (#1519)
* Add logging info in case sign in fails * Use string interpolation instead * Remove logger from auth service
This commit is contained in:
parent
12d31853de
commit
e3f9792b21
1 changed files with 6 additions and 0 deletions
|
|
@ -24,9 +24,15 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
|||
else
|
||||
session["devise.#{provider}_data"] = request.env["omniauth.auth"]
|
||||
user_errors = @user.errors.full_messages
|
||||
logger.error "Log in error: sign in failed. username: #{@user.username} - email: #{@user.email}"
|
||||
logger.error "Log in error: auth data hash - #{request.env['omniauth.auth']}"
|
||||
logger.error "Log in error: user_errors: #{user_errors}"
|
||||
flash[:alert] = user_errors
|
||||
redirect_to new_user_registration_url
|
||||
end
|
||||
rescue StandardError => error
|
||||
logger.error "Log in error: #{error}"
|
||||
logger.error "Log in error: auth data hash - #{request.env['omniauth.auth']}"
|
||||
end
|
||||
|
||||
def persisted_and_valid?
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue