Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
An OmniAuth Strategy for Toshl.
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib v0.0.1
spec v0.0.1
.gitignore v0.0.1
.travis.yml v0.0.1
Gemfile v0.0.1
LICENSE.txt v0.0.1
README.md Update README.md
Rakefile v0.0.1
omniauth-toshl.gemspec v0.0.1

README.md

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
Something went wrong with that request. Please try again.