|
|
@ -12,13 +12,12 @@ defmodule UserFromAuth do |
|
|
|
end |
|
|
|
|
|
|
|
# github does it this way |
|
|
|
|
|
|
|
defp avatar_from_auth(%{info: %{urls: %{avatar_url: image}}}), do: image |
|
|
|
|
|
|
|
facebook does it this way |
|
|
|
defp avatar_from_auth(%{info: %{image: image}}), do: image |
|
|
|
|
|
|
|
default case if nothing matches |
|
|
|
#facebook does it this way |
|
|
|
defp avatar_from_auth(%{info: %{image: image}}), do: image |
|
|
|
|
|
|
|
#default case if nothing matches |
|
|
|
defp avatar_from_auth(auth) do |
|
|
|
Logger.warn(auth.provider <> " needs to find an avatar URL!") |
|
|
|
Logger.debug(Jason.encode!(auth)) |
|
|
|