Skip to content

Commit 28e18a7

Browse files
willykaramdoomspork
authored andcommitted
Adding image to user %Info (#34)
Pretty much all other Ueberauth strategies use image: for purposes of the user avatar. I suggest doing this same with the GitHub strategy, so as to avoid needing to customize the templating for this strategy. As an example see: these other strategies LINE 111 in https://github.com/ueberauth/ueberauth_facebook/blob/master/lib/ueberauth/strategy/facebook.ex LINE 109 in https://github.com/fajarmf/ueberauth_linkedin/blob/master/lib/ueberauth/strategy/linkedin.ex LINE 76 https://github.com/ueberauth/ueberauth_twitter/blob/master/lib/ueberauth/strategy/twitter.ex
1 parent d4800b0 commit 28e18a7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/ueberauth/strategy/github.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ defmodule Ueberauth.Strategy.Github do
172172
nickname: user["login"],
173173
email: user["email"] || Enum.find(user["emails"] || [], &(&1["primary"]))["email"],
174174
location: user["location"],
175+
image: user["avatar_url"],
175176
urls: %{
176177
followers_url: user["followers_url"],
177178
avatar_url: user["avatar_url"],

0 commit comments

Comments
 (0)