ueberauth / ueberauth_facebook

Facebook OAuth2 Strategy for Überauth.
MIT License
77 stars 64 forks source link

:connect_timeout #35

Open aliabbas-2012 opened 7 years ago

aliabbas-2012 commented 7 years ago

OAuth2.Error at GET /auth/facebook/callback :connect_timeout I tested on different machine and browsers its still happening

Betree commented 7 years ago

I sometimes run into this error too on localhost when my connection is slow.

Ueberauth_facebook uses oauth2 Request module, which uses hackney with a default timeout of 5 seconds. As oauth2 Request module supports recv_timeout option, it would be nice to have it in ueberauth_facebook as well.

We could do it by adding a :timeout setting in config.exs that would be passed to get_token!

Ueberauth.Strategy.Facebook.OAuth.get_token!([code: code], opts, [], [timeout: timeout_value])
Hajto commented 7 years ago

Will check if that works.