0.0
No release in over 3 years
Kick OAuth2 Strategy for OmniAuth
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

 Project Readme

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: 'johndoe@gmail.com',
    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
  }
}