Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

h2ocube/omniauth-toshl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OmniAuth::Toshl

An OmniAuth Strategy for Toshl.com

Gem Version Build Status

Installation

Add this line to your application's Gemfile:

gem 'omniauth-toshl'

And then execute:

$ bundle

Or install it yourself as:

$ gem install omniauth-toshl

Usage

Sinatra

require 'omniauth'
require 'omniauth-toshl'

use Rack::Session::Cookie
use OmniAuth::Builder do
  provider :toshl, 'YOUR_CLIENT_ID', 'YOUR_CLIENT_SECRET'
end

get '/auth/:provider/callback' do
  # Do something with auth_hash
  redirect to('/')
end

def auth_hash
  request.env['omniauth.auth']
end