# Discourse-saml: There was an error authorizing your account

**URL:** <https://meta.discourse.org/t/discourse-saml-there-was-an-error-authorizing-your-account/54469>\
**Category:** SSO\
**Created:** [2016 年 12 月 19 日午前 4:55 UTC](https://meta.discourse.org/t/discourse-saml-there-was-an-error-authorizing-your-account/54469 "2016-12-19T04:55:37Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![skoota](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/skoota/32/65472_2.png) [@skoota](https://meta.discourse.org/u/skoota)\
**Post date:** [2016 年 12 月 19 日午前 4:55 UTC](https://meta.discourse.org/t/discourse-saml-there-was-an-error-authorizing-your-account/54469/1 "2016-12-19T04:55:37Z")

</div>

Hi All,

So, following on from my [post yesterday](https://meta.discourse.org/t/discourse-saml-user-creation-and-authentication-attribute/54443/1) I have installed the `discourse-saml` plugin. Our iDP has setup everything on their end, but whenever we attempt to login the following message appears:

> Sorry, there was an error authorizing your account. Perhaps you did not approve authorization?

Searching around meta I have found others with this same issues, but it usually relates to social login (e.g. Facebook, Twitter, etc.) rather than using a SSO plugin like `discourse-saml`.

Looking in the logs, here is the error message:

`(saml) Authentication failure! invalid_ticket: OneLogin::RubySaml::ValidationError, The response was received at https://example.com/auth/saml/callback instead of http://example.com/auth/saml/callback`

So it looks like the response is going to the https site, whereas it wants to go to the http site. Not sure why it wants the response on the http site - does anyone have an idea about how to tell the plugin to expect the response on the https site?

Thanks in advance!

---

_[View the full topic](https://meta.discourse.org/t/discourse-saml-there-was-an-error-authorizing-your-account/54469)._
