Sha256: 92bd80b54e8c8b36c5ac9b779245535c2d7de2d30d262846a648232b6027b95e

Contents?: true

Size: 472 Bytes

Versions: 34

Compression:

Stored size: 472 Bytes

Contents

require 'omniauth-oauth2'

module OmniAuth
  module Strategies
    class Spotify < OmniAuth::Strategies::OAuth2
      option :name, 'spotify'

      option :client_options, {
        site:          RSpotify::API_URI,
        authorize_url: RSpotify::AUTHORIZE_URI,
        token_url:     RSpotify::TOKEN_URI,
      }

      uid { raw_info['id'] }

      info { raw_info }

      def raw_info
        @raw_info ||= access_token.get('me').parsed
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
rspotify-2.10.1 lib/rspotify/oauth.rb
rspotify-2.10.0 lib/rspotify/oauth.rb
rspotify-2.9.2 lib/rspotify/oauth.rb
rspotify-2.9.1 lib/rspotify/oauth.rb
rspotify-2.9.0 lib/rspotify/oauth.rb
rspotify-2.8.0 lib/rspotify/oauth.rb
rspotify-2.7.0 lib/rspotify/oauth.rb
rspotify-2.6.1 lib/rspotify/oauth.rb
rspotify-2.6.0 lib/rspotify/oauth.rb
rspotify-2.5.0 lib/rspotify/oauth.rb
rspotify-2.4.1 lib/rspotify/oauth.rb
rspotify-2.4.0 lib/rspotify/oauth.rb
rspotify-2.3.1 lib/rspotify/oauth.rb
rspotify-2.3.0 lib/rspotify/oauth.rb
rspotify-2.2.1 lib/rspotify/oauth.rb
rspotify-2.2.0 lib/rspotify/oauth.rb
rspotify-2.1.1 lib/rspotify/oauth.rb
rspotify-2.1.0 lib/rspotify/oauth.rb
rspotify-2.0.0 lib/rspotify/oauth.rb
rspotify-1.27.0 lib/rspotify/oauth.rb