Skip to content

Commit

Permalink
fix: Log the error body (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmessinger authored Feb 22, 2024
1 parent 6a647c3 commit 250c4e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ueberauth/strategy/google.ex
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ defmodule Ueberauth.Strategy.Google do
resp = Ueberauth.Strategy.Google.OAuth.get(token, get_userinfo_endpoint(conn))

case resp do
{:ok, %OAuth2.Response{status_code: 401, body: _body}} ->
set_errors!(conn, [error("token", "unauthorized")])
{:ok, %OAuth2.Response{status_code: 401, body: body}} ->
set_errors!(conn, [error("token", "unauthorized" <> body)])

{:ok, %OAuth2.Response{status_code: status_code, body: user}}
when status_code in 200..399 ->
Expand Down

0 comments on commit 250c4e4

Please sign in to comment.