# Rare SSO issue causing 500 error and no log entry

**URL:** https://meta.discourse.org/t/rare-sso-issue-causing-500-error-and-no-log-entry/54151
**Category:** SSO
**Created:** [13 Dicembre 2016, 12:10am UTC](https://meta.discourse.org/t/rare-sso-issue-causing-500-error-and-no-log-entry/54151 "2016-12-13T00:10:20Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Jesse\_Houston](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@Jesse\_Houston](https://meta.discourse.org/u/Jesse_Houston)
#### Post date: [13 Dicembre 2016, 12:10am UTC](https://meta.discourse.org/t/rare-sso-issue-causing-500-error-and-no-log-entry/54151/1 "2016-12-13T00:10:20Z")

</div>

Hey there,

We have a rare bug (~5% of users) in our [Discourse SSO](https://meta.discourse.org/t/13045?silent=true) implementation where the user authenticates against our backend, then is sent back to Discourse with the SSO and Sig parameters, but are returned the error message:

` "There was a problem with you account. Please contact the site's administrator."`

The user will be stuck in this message and be unable to continue, even on different browsers or devices. The following is then logged to the /var/discourse/shared/standalone/log/rails/production.log:

```
9638907- Parameters: {"sso"=>"bm9uY2U9NDU2ZWMwNzhmNzdjZDI5NDIzMTA0NGZkZmU3MDlmNzkmZW1haWw9c2lsdmVydHJpczc5JTQwZ21haWwuY29tJmV4dGVybmFsX2lkPUE1OURCMjQ4ODIyNkM5RjYmdXNlcm5hbWU9U2lsdnJpcw==", "sig"=>"4ea1a0b741fe761e77cac5e0ce8c0385ae6c4b7b72fd37db298e64da82c8b180"}
9639164- Rendered text template (0.0ms)
9639197:Completed 500 Internal Server Error in 51ms (Views: 0.9ms | ActiveRecord: 26.3ms)

```

Nothing is then logged to /var/discourse/shared/standalone/log/rails/production\_errors.log or [https://discourse.example.com/logs](https://discourse.example.com/logs)

We found a rather odd workaround. If we reset the user’s password in our backend, then log in on our computers, then set the password back to the original password, the users are then able to log in. /shrug

Any help would be greatly appreciated!

---

<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: [13 Dicembre 2016, 12:15am UTC](https://meta.discourse.org/t/rare-sso-issue-causing-500-error-and-no-log-entry/54151/2 "2016-12-13T00:15:34Z")

</div>

Is there anywhere else to look for info on these errors @sam?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [13 Dicembre 2016, 12:19am UTC](https://meta.discourse.org/t/rare-sso-issue-causing-500-error-and-no-log-entry/54151/3 "2016-12-13T00:19:02Z")

</div>

Is verbose sso logging enabled per site settings?

---

<div class="post-metadata">

### Author: ![Jesse\_Houston](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@Jesse\_Houston](https://meta.discourse.org/u/Jesse_Houston)
#### Post date: [13 Dicembre 2016, 3:44am UTC](https://meta.discourse.org/t/rare-sso-issue-causing-500-error-and-no-log-entry/54151/5 "2016-12-13T03:44:24Z")

</div>

I just enabled it, will wait for an error and let ya know.

---

<div class="post-metadata">

### Author: ![Jesse\_Houston](https://avatars.discourse-cdn.com/v4/letter/j/e19adc/32.png) [@Jesse\_Houston](https://meta.discourse.org/u/Jesse_Houston)
#### Post date: [13 Dicembre 2016, 4:18am UTC](https://meta.discourse.org/t/rare-sso-issue-causing-500-error-and-no-log-entry/54151/6 "2016-12-13T04:18:45Z")

</div>

Looks like it was

```
  Verbose SSO log: Record was invalid: User 
  {:ip_address=>"New registrations are not allowed from your IP address (maximum limit reached). Contact a staff member."}

```

Being caused by proxy users and Avast SafeZone users. I set the IP blocks to functionally unlimited (999999) and the problem has gone away for users. I’ll keep an eye on it for another day or so and see if it stays cleared up.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [8 Aprile 2019, 3:38pm UTC](https://meta.discourse.org/t/rare-sso-issue-causing-500-error-and-no-log-entry/54151/7 "2019-04-08T15:38:51Z")

</div>



---

<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: [8 Aprile 2019, 5:17pm UTC](https://meta.discourse.org/t/rare-sso-issue-causing-500-error-and-no-log-entry/54151/8 "2019-04-08T17:17:31Z")

</div>


