WebTheoryLLC / omniauth-twitch

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

Adding New scopes results in error #13

Closed rigel-eva closed 2 years ago

rigel-eva commented 6 years ago

Changing scopes currently does not work, the URL ends up auto encoding and replacing it with the escaped version of the deliminator needed to add on additional scopes, resulting in a 400 error on Twitch's side.

Expected Behavior: https://api.twitch.tv/kraken/oauth2/authorize?client_id=[client_id]&redirect_uri=[redirect_uri]&response_type=code&scope=openid+chat_login&state=[state] Current Behavior: https://api.twitch.tv/kraken/oauth2/authorize?client_id=[client_id]&redirect_uri=[redirect_uri]&response_type=code&scope=openid%2Bchat_login&state=[state]

omniauth.rb:

[...]
  provider :twitch, ENV['TWITCH_CHAT_KEY'], ENV['TWITCH_CHAT_SECRET'],{
    :name =>'twitch_chat',
    :scope =>'openid+chat_login',
    :callback_path=>"/auth/twitch_chat/callback"
  }
[...]