Update lib/ueberauth/strategy/twitter.ex

Co-Authored-By: snewcomer <snewcomer@users.noreply.github.com>
This commit is contained in:
Yordis Prieto 2018-12-23 14:13:00 -08:00 committed by GitHub
parent 78711b26d6
commit 492e725d58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,7 @@ defmodule Ueberauth.Strategy.Twitter do
{:ok, %{status_code: 401, body: _, headers: _}} ->
set_errors!(conn, [error("token", "unauthorized")])
{:ok, %{status_code: status_code, body: body, headers: _}} when status_code in 200..399 ->
body = json_library().decode!(body)
body = Ueberauth.Config.json_library().decode!(body)
conn
|> put_private(:twitter_token, token)