WebTheoryLLC / omniauth-twitch

OmniAuth Strategy for Twitch
MIT License
32 stars 22 forks source link

Omniauth OAuth2 made a breaking change to callback_url #3

Closed jtokoph closed 8 years ago

jtokoph commented 8 years ago

This merged commit removed the callback_url method override: https://github.com/intridea/omniauth-oauth2/pull/70

It now defers to the base strategy callback_url which appends the current query string to the redirect_uri that is passed to the token request. This breaks the omniauth-twitch gem since twitch expects a redirect_uri that exactly matches the config

Two possible fixes:

  1. Pin the omniauth-oauth2 dependency to 1.3.1 or less:

    spec.add_runtime_dependency 'omniauth-oauth2', ['>= 1.1', '<= 1.3.1']
  2. Override the callback_url method in the strategy:

    def callback_url
     full_host + script_name + callback_path
    end
Unsafepond commented 8 years ago

Thanks for the fix, works like a charm. Saved my project for school! ʘ ͜ʖ ʘ

jcgertig commented 8 years ago

Sorry for the late reply did not realize I was not set to watch automatically