FEATURE: Trigger Discourse events from authenticators. (#7724)

This commit is contained in:
Dan Ungureanu
2019-06-11 04:28:42 +03:00
committed by Sam
parent d073a7d5a8
commit a046f6ced5
3 changed files with 3 additions and 1 deletions

View File

@ -1165,6 +1165,7 @@ class UsersController < ApplicationController
# We're likely going to contact the remote auth provider, so hijack request
hijack do
DiscourseEvent.trigger(:before_auth_revoke, authenticator, user)
result = authenticator.revoke(user, skip_remote: skip_remote)
if result
render json: success_json