GitXplorerGitXplorer
m

omniauth-twitchtv

public
8 stars
6 forks
0 issues

Commits

List of commits on branch master.
Verified
bc5da1bbaf0704e7b656083580ab683f230d794e

update to helix

mmasterkain committed 3 years ago
Verified
a9bbac13cd0d2aeada123f0cdb1a6090e5430984

update to helix

mmasterkain committed 3 years ago
Unverified
ee06d07d52b18a44ca042a5ca0af6d325245a78d

update integration, 1.0.0

mmasterkain committed 8 years ago
Unverified
915d6b98c123de7eeb7b0739010d1e2d5e5abe61

update

mmasterkain committed 8 years ago
Unverified
34cfdd220122e55a0be2c2dd693d40b01dbf14bd

update

mmasterkain committed 8 years ago
Unverified
7bd23695af7e54441b92350516696570cc78b31e

Merge pull request #5 from JFickel/patch-1

mmasterkain committed 11 years ago

README

The README file for this repository.

OmniAuth Twitchtv

This gem contains a Twitchtv OAuth2 Strategy for OmniAuth.

Installation

Add to your Gemfile:

gem 'omniauth-twitchtv', github: 'masterkain/omniauth-twitchtv'

Then bundle install.

Usage

Add the config line below to application's Devise intitializer.

config.omniauth :twitchtv, Settings.twitchtv.client_id, Settings.twitchtv.client_secret, scope: Settings.twitchtv.permissions.join(" ")

Sample config:

config.omniauth :twitchtv, '4n6jy6klu89s300ap05t', 'a3d3dm9ag6s5an33p01', scope: 'user_read channel_editor channel_commercial channel_read'

Auth Hash

Here's an example Auth Hash available in request.env['omniauth.auth']:

{
  :provider => 'twitchtv',
  :uid => '1234567',
  :info => {
    :nickname => 'jmbloggs',
    :email => 'jm@bloggs.com',
    :name => 'jmbloggs',
    :image => 'http://static-cdn.jtvnw.net/jtv_user_pictures/jmbloggs-profile_image-e22f9c709cb15002-300x300.jpeg',
    :urls => {
      :twitchtv => 'https://www.twitch.tv/jmb0000/profile',
      :website => 'https://api.twitch.tv/kraken/users/jmb0000'
    },
    :partnered => false
  },
  :credentials => {
    :expires => false,
    :token => '897cacaca...',
    :secret => '8c2na7ca7and7...'
  },
  :extra => {
    :raw_info => {
      ...
    }
  }
}