No commit activity in last 3 years
No release in over 3 years
Streamlabs OAuth2 strategy for OmniAuth
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 2.2.10
>= 12.3.3

Runtime

 Project Readme

Omniauth::Streamlabs

An Omniauth strategy for Streamlabs

Installation

Add this line to your application's Gemfile:

gem 'omniauth-streamlabs'

And then execute:

$ bundle

Or install it yourself as:

$ gem install omniauth-streamlabs

Usage

Here's an example for adding the middleware to a Rails app in config/initializers/omniauth.rb:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :twitch, ENV["STREAMLABS_CLIENT_ID"], ENV["STREAMLABS_CLIENT_SECRET"]
end

Auth Hash

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

{
  provider: 'streamlabs',
  uid: 12345678,
  info: {
    display_name: 'johndoe',
    name: 'JohnDoe',
  },
  credentials: {
    token: 'asdfghjklasdfghjklasdfghjkl', # OAuth 2.0 access_token, which you may wish to store
    expires: false # this will always be false
  },
  extra: {
    raw_info: {
      twitch: {
        display_name: 'johndoe',
        name: 'JohnDoe',
        _id: 12345678,
      },
    }
  }
}

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/prognostikos/omniauth-streamlabs. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.