oauth2orize icon indicating copy to clipboard operation
oauth2orize copied to clipboard

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

Open tups-ibl opened this issue 7 years ago • 1 comments

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.

tups-ibl avatar Jun 20 '17 03:06 tups-ibl

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;

rvmey avatar Sep 08 '18 12:09 rvmey