Current section
4 Versions
Jump to
Current section
4 Versions
Compare versions
5
files changed
+17
additions
-12
deletions
| @@ -3,3 +3,4 @@ | |
| 3 3 | erl_crash.dump |
| 4 4 | *.ez |
| 5 5 | .DS_Store |
| 6 | + /doc |
| @@ -10,7 +10,7 @@ | |
| 10 10 | |
| 11 11 | ```elixir |
| 12 12 | def deps do |
| 13 | - [{:ueberauth_spotify, git: "https://github.com/markusherzog/ueberauth_spotify.git"}] |
| 13 | + [{:ueberauth_spotify, "0.0.2"}] |
| 14 14 | end |
| 15 15 | ``` |
| @@ -13,12 +13,12 @@ | |
| 13 13 | {<<"maintainers">>,[<<"Markus Herzog">>]}. |
| 14 14 | {<<"name">>,<<"ueberauth_spotify">>}. |
| 15 15 | {<<"requirements">>, |
| 16 | - [{<<"oauth2">>, |
| 17 | - [{<<"app">>,<<"oauth2">>}, |
| 18 | - {<<"optional">>,false}, |
| 19 | - {<<"requirement">>,<<"~> 0.5">>}]}, |
| 20 | - {<<"ueberauth">>, |
| 21 | - [{<<"app">>,<<"ueberauth">>}, |
| 22 | - {<<"optional">>,false}, |
| 23 | - {<<"requirement">>,<<"~> 0.2">>}]}]}. |
| 24 | - {<<"version">>,<<"0.0.1">>}. |
| 16 | + [[{<<"app">>,<<"ueberauth">>}, |
| 17 | + {<<"name">>,<<"ueberauth">>}, |
| 18 | + {<<"optional">>,false}, |
| 19 | + {<<"requirement">>,<<"~> 0.2">>}], |
| 20 | + [{<<"app">>,<<"oauth2">>}, |
| 21 | + {<<"name">>,<<"oauth2">>}, |
| 22 | + {<<"optional">>,false}, |
| 23 | + {<<"requirement">>,<<"~> 0.5">>}]]}. |
| 24 | + {<<"version">>,<<"0.0.2">>}. |
| @@ -3,7 +3,9 @@ defmodule Ueberauth.Strategy.Spotify do | |
| 3 3 | Spotify Strategy for Überauth. |
| 4 4 | """ |
| 5 5 | |
| 6 | - use Ueberauth.Strategy, uid_field: :uid, default_scope: "user-read-email" |
| 6 | + use Ueberauth.Strategy, uid_field: :uid, |
| 7 | + default_scope: "user-read-email" |
| 8 | + |
| 7 9 | alias Ueberauth.Auth.Info |
| 8 10 | |
| 9 11 | @doc """ |
| @@ -59,10 +61,12 @@ defmodule Ueberauth.Strategy.Spotify do | |
| 59 61 | name: user["display_name"], |
| 60 62 | nickname: user["id"], |
| 61 63 | email: user["email"], |
| 64 | + image: hd(user["images"])["url"] |
| 62 65 | } |
| 63 66 | end |
| 64 67 | |
| 65 68 | defp option(conn, key) do |
| 66 69 | Dict.get(options(conn), key, Dict.get(default_options, key)) |
| 67 70 | end |
| 71 | + |
| 68 72 | end |
| @@ -3,7 +3,7 @@ defmodule UeberauthSpotify.Mixfile do | |
| 3 3 | |
| 4 4 | def project do |
| 5 5 | [app: :ueberauth_spotify, |
| 6 | - version: "0.0.1", |
| 6 | + version: "0.0.2", |
| 7 7 | name: "Ueberauth Spotify Strategy", |
| 8 8 | package: package, |
| 9 9 | elixir: "~> 1.1", |