2012-02-26 16:45:38 +00:00
|
|
|
class OauthHelper
|
|
|
|
|
|
|
|
def self.get_avatar_url(auth)
|
|
|
|
if auth["provider"] == "twitter"
|
|
|
|
auth["info"]["image"]
|
|
|
|
elsif auth["provider"] == "github"
|
2012-03-02 21:33:37 +00:00
|
|
|
auth["extra"]["raw_info"]["avatar_url"]
|
2012-02-26 16:45:38 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|