I found that the issue was caused by the change of return value in OAuth2.Client.get_token!/1 in 'oauth2'. Specifically, ueberauth_facebook requires 'oauth2' using the '~> 0.5' version string. This causes new Phoenix apps to pull 'oauth2' 0.7.0 which causes the issue above.
Steps to reproduce:
1) Create a new Phoenix application 2) Follow the ueberauth_facebook README to add it to the app 3) Add login code 4) Try to log in
Trying to log in causes the following issue:
key :access_token not found in: %OAuth2.Client{authorize_url: "https://www.facebook.com/dialog/oauth", client_id: "...", client_secret: "...", headers: [], params: %{}, redirect_uri: "http://localhost:3000/auth/facebook/callback", site: "https://graph.facebook.com", strategy: Ueberauth.Strategy.Facebook.OAuth, token: %OAuth2.AccessToken{access_token: nil, expires_at: nil, other_params: %{"error" => %{"code" => 1, "fbtrace_id" => "...", "message" => "Error validating client secret.", "type" => "OAuthException"}}, refresh_token: nil, token_type: "Bearer"}, token_method: :post, token_url: "/oauth/access_token"}
I found that the issue was caused by the change of return value in OAuth2.Client.get_token!/1 in 'oauth2'. Specifically, ueberauth_facebook requires 'oauth2' using the '~> 0.5' version string. This causes new Phoenix apps to pull 'oauth2' 0.7.0 which causes the issue above.