OmniAuth::Kick

A OmniAuth strategy for Kick

Installation

Add the OmniAuth Kick and OmniAuth rails_csrf_protection gems to your Gemfile

gem 'omniauth-kick'
gem 'omniauth-rails_csrf_protection'

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 :kick, ENV["KICK_CLIENT_ID"], ENV["KICK_CLIENT_SECRET"]
end

Auth Hash

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

{
  provider: 'kick',
  uid: '12345678',
  info: {
    name: 'JohnDoe',
    email: '[email protected]',
    image: 'https://kick.com/img/default-profile-pictures/default-avatar-6.webp',
    url: 'https://kick.com/johndoe'
  },
  credentials: {
    token: 'asdfghjklasdfghjklasdfghjkl', # OAuth 2.0 access_token, which you may wish to store
    expires: false # this will always be false,
    refresh_token: 'asdschbjh24h23yfsjfhbsjdc3a' # OAuth 2.0 refresh token, to renew the access token when it expires
  }
}