Added audit logging for users logging in via oauth
This commit is contained in:
parent
9635b3968c
commit
d9e4f7416f
1 changed files with 2 additions and 1 deletions
|
|
@ -41,7 +41,8 @@ class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
|
|||
# Move the screenshots to the real account and tell the user.
|
||||
if @user.persisted?
|
||||
flash[:notice] = I18n.t "devise.omniauth_callbacks.success", :kind => provider_name
|
||||
sign_in_and_redirect @user, :event => :authentication
|
||||
auditlog "User #{@user.name}/#{@user.email} logged in via #{provider_name}."
|
||||
sign_in_and_redirect @user, event: :authentication
|
||||
else
|
||||
redirect_to new_user_session_url, alert: @user.errors.full_messages.join("\n")
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue