# 用户（patron）收到授权错误消息

**URL:** https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578
**Category:** Support
**Tags:** patreon
**Created:** [2018年十月15日 21:02 UTC](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578 "2018-10-15T21:02:09Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![caduspa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/caduspa/32/111350_2.png) [@caduspa](https://meta.discourse.org/u/caduspa)
#### Post date: [2018年十月15日 21:02 UTC](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578/1 "2018-10-15T21:02:09Z")

</div>

A longtime user started being unable to access Discourse. She’s tried several devices, cleared her cache and is in good standing with Patreon. The error message reads “Sorry, there was an error authorizing you’re account. Perhaps you did not approve authorization?”

Is there something I can do on my side to assist?

---

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [2018年十月17日 01:26 UTC](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578/2 "2018-10-17T01:26:29Z")

</div>

Please ask your user to login again, but before you should enable the site setting `patreon verbose log`, then you should report here the error you will find on `/admin/logs` (if there is the error)

---

<div class="post-metadata">

### Author: ![jaihaze](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jaihaze/32/95691_2.png) [@jaihaze](https://meta.discourse.org/u/jaihaze)
#### Post date: [2018年十月17日 01:32 UTC](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578/3 "2018-10-17T01:32:01Z")

</div>

ive had the same problem. The problem goes away when on desktop, however mobile throws this error every time

---

<div class="post-metadata">

### Author: ![jaihaze](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jaihaze/32/95691_2.png) [@jaihaze](https://meta.discourse.org/u/jaihaze)
#### Post date: [2018年十月17日 01:51 UTC](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578/4 "2018-10-17T01:51:00Z")

</div>

(patreon) Authentication failure! csrf\_detected: OmniAuth::Strategies::OAuth2::CallbackError, csrf\_detected | CSRF detected

is the error when trying to login via mobile, even if logged in thru desktop. Its almost like its detecting ip spoofing or proxies. This only started happening when I upgraded to business plan, and some people have always had this issue on mobile. so its good we figure this out

 ![IMG_E58527ACBBE7-1](https://global.discourse-cdn.com/meta/original/3X/d/0/d04041ae30dba4c68874c8b636eb4587f3e70205.jpeg)

---

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [2018年十月17日 01:57 UTC](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578/5 "2018-10-17T01:57:40Z")

</div>

I can login with my android phone without problem. Try the login in incognito mode and be sure to use the HTTPS version of your domain

---

<div class="post-metadata">

### Author: ![jaihaze](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jaihaze/32/95691_2.png) [@jaihaze](https://meta.discourse.org/u/jaihaze)
#### Post date: [2018年十月17日 02:04 UTC](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578/6 "2018-10-17T02:04:08Z")

</div>

again, did it no dice. Some people have no issues, a lot of mobile users that are logging in with patreon are having the issue

here is a video of all incognito  
[https://cl.ly/e346a947dfab/ScreenRecording\_10-16-2018%25252022-00-26.MP4](https://cl.ly/e346a947dfab/ScreenRecording_10-16-2018%25252022-00-26.MP4)

---

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [2018年十月17日 02:15 UTC](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578/7 "2018-10-17T02:15:14Z")

</div>

So the problem is not on android devices but is on iPhone, iPad and Apple devices?  
Can you confirm that with your users?

---

<div class="post-metadata">

### Author: ![jaihaze](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jaihaze/32/95691_2.png) [@jaihaze](https://meta.discourse.org/u/jaihaze)
#### Post date: [2018年十月17日 02:19 UTC](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578/8 "2018-10-17T02:19:28Z")

</div>

all platforms, that was just me. Android, PC and iPad (one of your guys here have the issue as well on the ipad and has been able to duplicate it). So its across the board

---

<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: [2018年十月17日 04:52 UTC](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578/9 "2018-10-17T04:52:53Z")

</div>

@Falco I can reproduce the error that’s described here when I try to login through Patreon on my iPad (tested with Safari and Chrome.) On Android and on Desktop Chrome I can login through Patreon without any problem.

Do you have any idea what the problem could be?

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [2018年十月17日 11:54 UTC](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578/13 "2018-10-17T11:54:28Z")

</div>

I think this is not Patreon specific error. I’m able to see few discussions over it in the `omniauth-oauth2` repo. I will check the issue.

> <https://github.com/omniauth/omniauth-oauth2/issues/32>
>
> I'm seeing an error:
> 
> \`Authentication failure! invalid\_credentials: OmniAuth::St…rategies::OAuth2::CallbackError, OmniAuth::Strategies::OAuth2::CallbackError\`
> 
> I am 100% certain my login credentials are correct. I am authenticating via LDAP with devise, that works. The app redirects to the app the user should access and then it raises the OAuth2::CallbackError.
> 
> I subclassed the OAuth2 Strategy to make my own. Located below is my OAuth2 Strategy:
> 
> \`\`\`
> 
> require 'omniauth-oauth2'
> module OmniAuth
> module Strategies
> class Agencyea \< OmniAuth::Strategies::OAuth2
> 
> option :name, "agencyea"
> 
> CUSTOM\_PROVIDER\_URL = 'http://launchpad.lvh.me:3000'
> 
> option :client\_options, {
> :site =\> CUSTOM\_PROVIDER\_URL,
> :authorize\_url =\> "#{CUSTOM\_PROVIDER\_URL}/auth/agencyea/authorize",
> :access\_token\_url =\> "#{CUSTOM\_PROVIDER\_URL}/auth/agencyea/access\_token"
> }
> 
> uid { raw\_info\['id'\] }
> 
> info do
> {
> :email =\> raw\_info\['email'\]
> }
> end
> 
> extra do
> {
> :first\_name =\> raw\_info\['extra'\]\['first\_name'\],
> :last\_name =\> raw\_info\['extra'\]\['last\_name'\]
> }
> end
> 
> def raw\_info
> @raw\_info ||= access\_token.get("/auth/agencyea/user.json?oauth\_token=#{access\_token.token}").parsed
> end
> end
> end
> end
> \`\`\`
> 
> Any thoughts? What other information would you need to help?

> <https://github.com/omniauth/omniauth-oauth2/issues/58>
>
> Even when creating the state myself it got the same error.
> 
> \`\`\` ruby
> session\['om…niauth.state'\] = SecureRandom.hex(24)
> redirect\_to "/auth/google\_oauth2?state=#{session\['omniauth.state'\]}"
> \`\`\`
> 
> Even though the returned state is the same, meaning it should match !
> 
> Isn't there a double redirect or something ? 
> Because if so the : 
> 
> \`\`\` 'ruby
> request.params\['state'\] != session.delete('omniauth.state')
> \`\`\`
> 
> in https://github.com/intridea/omniauth-oauth2/blob/master/lib/omniauth/strategies/oauth2.rb#L72 would explain the problem.
> =\> First passes, second fail.
> 
> https://stackoverflow.com/questions/22386149/why-am-i-getting-csrf-detected-with-omniauth-and-google/23739564#23739564

---

<div class="post-metadata">

### Author: ![jaihaze](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jaihaze/32/95691_2.png) [@jaihaze](https://meta.discourse.org/u/jaihaze)
#### Post date: [2018年十月17日 14:54 UTC](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578/15 "2018-10-17T14:54:52Z")

</div>

yeah well some people dont have the issuye on my site while others including myself do

---

<div class="post-metadata">

### Author: ![jaihaze](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jaihaze/32/95691_2.png) [@jaihaze](https://meta.discourse.org/u/jaihaze)
#### Post date: [2018年十月17日 17:42 UTC](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578/17 "2018-10-17T17:42:52Z")

</div>

the problem is @vinothkannans is that some people can use it no problem, its just people certain people non stop. People have resorted to delering their account to try and reregister to get o the forum

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [2018年十月17日 18:29 UTC](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578/18 "2018-10-17T18:29:07Z")

</div>

It’s bad. I will try to fix the problem as soon as possible.

---

<div class="post-metadata">

### Author: ![jaihaze](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jaihaze/32/95691_2.png) [@jaihaze](https://meta.discourse.org/u/jaihaze)
#### Post date: [2018年十月17日 18:40 UTC](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578/19 "2018-10-17T18:40:08Z")

</div>

do you know what the problem is?

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [2018年十月17日 19:00 UTC](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578/20 "2018-10-17T19:00:08Z")

</div>

Yes. It looks like one of the required params not correctly carry forwarded across the requests. I think it’s lost while coming back from Patreon after the authentication flow.

---

<div class="post-metadata">

### Author: ![jaihaze](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jaihaze/32/95691_2.png) [@jaihaze](https://meta.discourse.org/u/jaihaze)
#### Post date: [2018年十月17日 19:00 UTC](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578/21 "2018-10-17T19:00:40Z")

</div>

will it take long to fix?

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [2018年十月17日 19:03 UTC](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578/22 "2018-10-17T19:03:39Z")

</div>

It shouldn’t take much time. I will try to fix it asap.

---

<div class="post-metadata">

### Author: ![jaihaze](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jaihaze/32/95691_2.png) [@jaihaze](https://meta.discourse.org/u/jaihaze)
#### Post date: [2018年十月17日 22:54 UTC](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578/23 "2018-10-17T22:54:55Z")

</div>

did what you do stop or remove the viewport? I cannot remove the option of the address bar anymore by adding it to home screen. And it keeps asking for authorizing

---

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [2018年十月18日 03:49 UTC](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578/24 "2018-10-18T03:49:29Z")

</div>

No I didn’t receive anything from the viewport for this fix. I think it’s unrelated.

---

<div class="post-metadata">

### Author: ![caduspa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/caduspa/32/111350_2.png) [@caduspa](https://meta.discourse.org/u/caduspa)
#### Post date: [2018年十月19日 16:13 UTC](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578/26 "2018-10-19T16:13:16Z")

</div>

My user is still unable to access on any device as of this morning (10.19.18)

[下一頁](https://meta.discourse.org/t/user-patron-getting-authorization-error-message/99578.md?page=2)
