-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid redirect URI with Devise #10
Comments
I believe I solved this by manually requiring omniauth-oauth2 ~1.3.1 My gemfile now:
Is this the standard way to fix this type of error? Since this seems like a common issue, can we add it into the documentation? |
Had the same problem with spotify, the above has also worked for me. |
Hi, I'm having a slightly different version of this problem:
The same thing works perfectly for omniauth-facebook but omniauth-spotify keeps providing the default uri :/ Any thoughts would be most welcome ! |
So for anyone having the same problem, @masterkain has already done the work on this: 158a324 fixes the issue for me. |
@masterkain could you create a |
hello, |
Fixes issue related to “Invalid Redirect URI” by applying two solutions: - adds the oauth2 Gem (see: icoretech/omniauth-spotify#10) - ensures there is an ending “/“ on the callback URI to match the Spotify formatting Both seem to be required to resolve the previously seen error.
I've seen this error elsewhere in the docs, but haven't seen anyone else trying to use Devise.
Found a similar issue on Stackoverflow.
Every request to Spotify returns with an error:
invalid_credentials: OAuth2::Error, invalid_grant: Invalid redirect URI {"error":"invalid_grant","error_description":"Invalid redirect URI"}
I have omniauth-spotify (0.0.9) and Devise (4.1.1) installed in my rails + angular application.
in devise.rb
config.omniauth :spotify, ENV["spotify_client_id"], ENV["spotify_client_secret"], scope: 'user-top-read user-read-email'
user.rb
routes.rb
My redirect URI is set for my Spotify app:
http://localhost:3000/users/auth/spotify/callback
Any ideas would be great. Let me know if you need any more information.
The text was updated successfully, but these errors were encountered: