zu-min / omniauth-timecrowd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Omniauth::Timecrowd

CircleCI

API Document

https://timecrowd.net/apidoc

Installation

Add this line to your application's Gemfile:

gem 'omniauth-timecrowd', github: 'ruffnote/omniauth-timecrowd'

And then execute:

$ bundle

Or install it yourself as:

$ gem install omniauth-timecrowd

Example

Register application on https://timecrowd.net/oauth/applications/new.
(Redirect URI: http://localhost:PORT/auth/timecrowd/callback)

$ cd example

# .env
TIMECROWD_CLIENT_ID="ID"
TIMECROWD_CLIENT_SECRET="SECRET"
TIMECROWD_SITE="https://timecrowd.net/"

$ rails s -p PORT
$ open http://localhost:PORT/
Rails.application.config.middleware.use OmniAuth::Builder do
  provider :timecrowd,
           ENV['TIMECROWD_CLIENT_ID'],
           ENV['TIMECROWD_CLIENT_SECRET'],
           client_options: { site: ENV['TIMECROWD_SITE'] }
end

Acknowledgements

https://github.com/intridea/omniauth-github

License

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

About

License:MIT License


Languages

Language:Ruby 79.9%Language:HTML 14.8%Language:CSS 2.5%Language:JavaScript 1.9%Language:CoffeeScript 0.6%Language:Shell 0.3%