# SSO keeps redirecting suspended users

**URL:** <https://meta.discourse.org/t/sso-keeps-redirecting-suspended-users/72452>\
**Category:** Bug\
**Created:** [October 20, 2017, 8:45am UTC](https://meta.discourse.org/t/sso-keeps-redirecting-suspended-users/72452 "2017-10-20T08:45:26Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [October 25, 2017, 8:52pm UTC](https://meta.discourse.org/t/sso-keeps-redirecting-suspended-users/72452/5 "2017-10-25T20:52:52Z")

</div>

It’s fairly easy to fix on the SSO provider end, but if it’s not fixed there the forum will appear to be broken.

For fixing it on Discourse, it’s possible to check if the user is suspended and login is required in the `sso_login` method. If true, redirect them back to the SSO provider, either to an `sso_suspended_url` that’s added as a site setting, or to the `sso_url` with some query parameters that the SSO provider can make use of.

---

_[View the full topic](https://meta.discourse.org/t/sso-keeps-redirecting-suspended-users/72452)._
