-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Facebook user info is not decoded from JSON #151
Comments
Hey @JohnDoneth! Did you discover anything to solve the issue? Having the same problem. |
@rubynho Yes, I forked the @impl true
def fetch_user(config, access_token) do
with {:ok, fields} <- Config.fetch(config, :user_url_request_fields),
{:ok, client_secret} <- Config.fetch(config, :client_secret) do
params = [
appsecret_proof: appsecret_proof(access_token, client_secret),
fields: fields,
access_token: access_token["access_token"]
]
# This decoding from JSON is the only difference between this module and
# the original from Assent.
case OAuth2.fetch_user(config, access_token, params) do
{:ok, json} -> {:ok, Jason.decode!(json)}
{:error, error} -> {:error, error}
end
end
end |
It's probably the content type header that has changed in the API response. Assent only looks for an |
It was the content type, adding the accept header makes it work. Fixed with #168. |
It looks like the result for
/me
for Facebook is returning a JSON payload but the payload is never decoded and passed to normalize where it fails. I don't believe this a configuration issue but I could be wrong. I've included my config and some of the dbg trail below:The text was updated successfully, but these errors were encountered: