Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Decision/Grant] ForbiddenError: Unable to load OAuth 2.0 transactions #208

Open
tups-ibl opened this issue Jun 20, 2017 · 1 comment
Open

Comments

@tups-ibl
Copy link

tups-ibl commented Jun 20, 2017

When I stayed at approval dialog, I tried to duplicate the dialog. In the first one, I chose Deny and it was fine. But in the second one, When I clicked to Deny, I got this message 'ForbiddenError: Unable to load OAuth 2.0 transactions: ...' and It made my server crashed. I knew that because the transaction_id was not available anymore but my question is How can I handle any error of oauth2orize to don't let the server be crashed.

@rvmey
Copy link

rvmey commented Sep 8, 2018

I was getting the same error with my Zapier oauth integration.

I'd click Deny, then retry, then Deny or Accept, then it would fail and I'd see this in my server log:
{ ForbiddenError: Unable to load OAuth 2.0 transaction: lnfyhWk3

I found that it didn't fail if my browser cache was disabled, so I fixed it by turning off caching for my /oauth route in my Nginx configuration:

location /oauth/ {
proxy_pass http://blahblah;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

    # kill cache:  Fixed Zapier Oauth Deny, try again flow
    sendfile off;
    add_header Last-Modified $date_gmt;
    add_header Cache-Control 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
    if_modified_since off;
    expires off;
    etag off;
    proxy_no_cache 1;
    proxy_cache_bypass 1;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants