Open alecguintu opened 8 years ago
can you show how are you initializing the gem? make sure to obscure used credentials.
omniauth.rb
OmniAuth.config.logger = Rails.logger
Rails.application.config.middleware.use OmniAuth::Builder do
provider :twitter, ENV['TWITTER_CONSUMER_KEY'], ENV['TWITTER_CONSUMER_SECRET']
provider :facebook, ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_APP_SECRET'], scope: 'public_profile', display: 'popup', info_fields: 'id,name,first_name,last_name,gender,about,bio,birthday,link'
provider :spotify, ENV['SPOTIFY_CLIENT_ID'], ENV['SPOTIFY_CLIENT_SECRET'], scope: 'user-follow-modify user-read-private playlist-read-private'
end
# https://github.com/intridea/omniauth/wiki/FAQ#wiki-omniauthfailureendpoint-does-not-redirect-in-development-mode
# Open ticket on a better fix for this https://github.com/intridea/omniauth/issues/616
OmniAuth.config.on_failure = Proc.new { |env|
OmniAuth::FailureEndpoint.new(env).redirect_to_failure
}
Gemfile (Gems I'm using just in case):
gem 'omniauth-twitter', '~> 1.0'
gem 'twitter', '~> 4.8'
gem 'omniauth-facebook', '~> 3.0'
gem 'omniauth-spotify', '~> 0.0.9'
Hello guys. First off, happy new year to you guys! Any leads to this? Any help would be appreciated.
I also have the same problem when i use facebook as login. I'd be happy to have a solution for this. thanks advance.
+1, this is with 0.0.9. Any leads on this? The gem just flat out doesn't work for me at the moment.
can you try some of the potental workarounds listed here? https://github.com/icoretech/omniauth-spotify/issues/7#issuecomment-155031356
@masterkain it appears omniauth-oauth2 has permanently added the query string back to the callback_url in v1.4.0 and doesn't seem to be planning to remove it. other projects such as omniauth-google-oauth2 have permeantly locked on omniauth-oauth2 1.3.1 until it's fixed, or overriding the callback_url in the strategy. we resolved by manually setting a gem dependency for an early version of omniauth-oauth2. perhaps it's worth locking omniauth-spotify below 1.3.1 or overriding callback_url in the strategy?
Hello guys. I need to use
omniauth-spotify
but there seems to be an error I always get. It always redirects me to/auth/failure
directly even before I get to do anyputs
on my callback action.I have on my Spotify App is callback: http://localhost:3000/auth/spotify/callback
I can provide more info if I need to.