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

oauth2 0.7.0 OAuth2.Client.get_token!/1 API change causes issue on recent installations #24

Closed
antond opened this issue Aug 20, 2016 · 1 comment

Comments

@antond
Copy link

antond commented Aug 20, 2016

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.

@antond
Copy link
Author

antond commented Aug 20, 2016

Fixed by #23

@antond antond closed this as completed Aug 20, 2016
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

1 participant