mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: List, revoke and reconnect associated accounts. Phase 1 (#6099)
Listing connections is supported for all built-in auth providers. Revoke and reconnect is currently only implemented for Facebook.
This commit is contained in:
@@ -2,12 +2,22 @@ class Auth::OpenIdAuthenticator < Auth::Authenticator
|
||||
|
||||
attr_reader :name, :identifier
|
||||
|
||||
def initialize(name, identifier, opts = {})
|
||||
def initialize(name, identifier, enabled_site_setting, opts = {})
|
||||
@name = name
|
||||
@identifier = identifier
|
||||
@enabled_site_setting = enabled_site_setting
|
||||
@opts = opts
|
||||
end
|
||||
|
||||
def enabled?
|
||||
SiteSetting.send(@enabled_site_setting)
|
||||
end
|
||||
|
||||
def description_for_user(user)
|
||||
info = UserOpenId.find_by(user_id: user.id)
|
||||
info&.email || ""
|
||||
end
|
||||
|
||||
def after_authenticate(auth_token)
|
||||
result = Auth::Result.new
|
||||
|
||||
|
||||
Reference in New Issue
Block a user