Class: OmniAuth::Strategies::TwitchOauth2
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::TwitchOauth2
- Defined in:
- lib/omniauth/strategies/twitch_oauth2.rb
Constant Summary collapse
- DEFAULT_SCOPE =
user_read: Read access to non-public user information, such as email address. user_blocks_edit: Ability to ignore or unignore on behalf of a user. user_blocks_read: Read access to a user’s list of ignored users. user_follows_edit: Access to manage a user’s followed channels. channel_read: Read access to non-public channel information, including email address and stream key. channel_editor: Write access to channel metadata (game, status, etc). channel_commercial: Access to trigger commercials on channel. channel_stream: Ability to reset a channel’s stream key. channel_subscriptions: Read access to all subscribers to your channel. channel_check_subscription: Read access to check if a user is subscribed to your channel. chat_login: Ability to log into chat and send messages.
"user_read"
Instance Method Summary collapse
Instance Method Details
#authorize_params ⇒ Object
32 33 34 35 36 37 |
# File 'lib/omniauth/strategies/twitch_oauth2.rb', line 32 def super.tap do |params| params[:scope] = params[:scope] ||= DEFAULT_SCOPE session['omniauth.state'] = params[:state] if request.params['state'] end end |
#raw_info ⇒ Object
53 54 55 |
# File 'lib/omniauth/strategies/twitch_oauth2.rb', line 53 def raw_info @raw_info ||= access_token.get('https://api.twitch.tv/kraken/user', params: { oauth_token: access_token.token }).parsed end |