# Syncing bans from SSO provider

**URL:** https://meta.discourse.org/t/syncing-bans-from-sso-provider/41554
**Category:** SSO
**Created:** [3월 25, 2016, 7:16오전 UTC](https://meta.discourse.org/t/syncing-bans-from-sso-provider/41554 "2016-03-25T07:16:14Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Nuck](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nuck/32/121732_2.png) [@Nuck](https://meta.discourse.org/u/Nuck)
#### Post date: [3월 25, 2016, 7:16오전 UTC](https://meta.discourse.org/t/syncing-bans-from-sso-provider/41554/1 "2016-03-25T07:16:14Z")

</div>

Would it be possible to sync a ban/suspension via SSO? If this is too broad for SSO (which, tbh, it probably is) is there a different API that would make it fairly simple?

For [Hummingbird.me](http://Hummingbird.me), we often get people we have to suspend (and occasionally hellban) to protect our other users, but we have to currently do two separate bans: one for our own server and one for Discourse, which frequently results in desynchronized bans… And the occasional “oh shit I’m sorry dude I thought we unbanned you months ago!”, which is about as awkward as it gets.

Anyways, I’m in the process of switching us to SSO from our current hand-rolled (yuck!) system, and I noticed that there’s already support for `admin` and `moderator` syncing (huzzah!) and custom fields (awesome!) and avatars (yay!) but it doesn’t look like there’s any way to synchronize the bans from our service onto Discourse.

So I guess my questions are:

1. Is this possible in SSO or via the API?
2. Assuming the answer is is “no”, how hard would it be to add? Where should I look to start?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [3월 25, 2016, 7:22오전 UTC](https://meta.discourse.org/t/syncing-bans-from-sso-provider/41554/2 "2016-03-25T07:22:33Z")

</div>

Hey this is great news, are you updating [hummingbird.me](http://hummingbird.me) to latest Discourse? Definitely switch to standard SSO, we’ll be happy to assist as we can.

---

<div class="post-metadata">

### Author: ![Nuck](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nuck/32/121732_2.png) [@Nuck](https://meta.discourse.org/u/Nuck)
#### Post date: [3월 25, 2016, 7:37오전 UTC](https://meta.discourse.org/t/syncing-bans-from-sso-provider/41554/3 "2016-03-25T07:37:33Z")

</div>

Yeah, we’re planning to completely rebuild our Discourse integrations from scratch as well as switch to a new box. We’ve been meaning to upgrade Discourse for a long time, but because our mods are kinda awkwardly tied into lots of Discourse internals (theres even an added database column without migrations, yuck), it requires a lot of staging before a production deploy, and we just haven’t had the time.

SSO reduces the amount of code we have inside Discourse, removes the need for [our highly-regrettable discourse fork](https://github.com/hummingbird-me/discourse), and obsoletes most of our discourse plugin, so it hopefully it means we don’t have to so carefully stage our deploys and can keep up with future updates on a more reasonable schedule.

I’ll probably have plenty of questions when I get down to doing deeper integrations (badges, notifications, etc.) — right now it’s fairly smooth sailing since we’re just in SSO territory

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [3월 27, 2016, 2:38오전 UTC](https://meta.discourse.org/t/syncing-bans-from-sso-provider/41554/4 "2016-03-27T02:38:35Z")

</div>

I think that a pair of values, `suspended_until` and `suspended_reason` would work. Does that work for you @Nuck?

And no, it’s not supported yet. These are the supported fields: [https://github.com/discourse/discourse/blob/master/lib/single\_sign\_on.rb#L2-L3](https://github.com/discourse/discourse/blob/master/lib/single_sign_on.rb#L2-L3)

---

<div class="post-metadata">

### Author: ![jack\_esss](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jack_esss/32/74583_2.png) [@jack\_esss](https://meta.discourse.org/u/jack_esss)
#### Post date: [6월 29, 2017, 3:48오후 UTC](https://meta.discourse.org/t/syncing-bans-from-sso-provider/41554/5 "2017-06-29T15:48:03Z")

</div>

Hi! Has there been any update on this? I’m interested as well.
