# Prevent Unlinking Social Accounts

**URL:** <https://meta.discourse.org/t/prevent-unlinking-social-accounts/198049>\
**Category:** Support\
**Created:** [July 24, 2021, 5:20am UTC](https://meta.discourse.org/t/prevent-unlinking-social-accounts/198049 "2021-07-24T05:20:54Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![cookieman768](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cookieman768/32/118511_2.png) [@cookieman768](https://meta.discourse.org/u/cookieman768)\
**Post date:** [July 24, 2021, 10:25pm UTC](https://meta.discourse.org/t/prevent-unlinking-social-accounts/198049/3 "2021-07-24T22:25:01Z")

</div>

That would partially do the trick, but would anyone know if there’s a way to make it impossible to do so? They could theoretically just go into the browser’s inspect element and un-hide it.

Edit: it looks like after doing some research into this, I found this: [discourse/lib/auth/managed\_authenticator.rb at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/main/lib/auth/managed_authenticator.rb)

What I found interesting was the “can revoke” part, I’m not too sure if I can modify the built-in Discord auth though. Does anyone know if this would be possible?  
Edit 2: I tried to modify the Steam Discourse login but was unsuccessful (probably due to my lack of knowledge with Ruby) but here’s what I tried:

```rb
# frozen_string_literal: true

# name: Steam authentication with Discourse
# about: Authenticate with Discourse with Steam
# version: 2.0.1
# author: J. de Faye, tgxworld

# omniauth-openid is not included in core since v2.4.0.beta10
unless defined? OmniAuth::Strategies::OpenID
  gem 'ruby-openid', '2.9.2', require: false
  gem 'rack-openid', '1.3.1', require: false
  gem 'omniauth-openid', '1.0.1'
end

gem 'omniauth-steam', '1.0.6'

register_svg_icon "fab-steam" if respond_to?(:register_svg_icon)

def can_revoke?
  false
end

register_asset 'stylesheets/steam-login.scss'

[
  "../lib/auth/steam_authenticator.rb",
  "../lib/validators/enable_steam_logins_validator.rb"
].each { |path| load File.expand_path(path, __FILE__ ) }

auth_provider authenticator: Auth::SteamAuthenticator.new, icon: 'fab-steam'

```

For reference, the file I modified is from [this](https://github.com/discourse/discourse-steam-login/blob/main/plugin.rb) extension.

Edit: I was totally editing the wrong part of the plugin, I was able to disable the feature entirely for Steam. Now I just need to figure out how to do this with the Discord login since that’s a core file.

---

_[View the full topic](https://meta.discourse.org/t/prevent-unlinking-social-accounts/198049)._
