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
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
https://github.com/intridea/omniauth-github
The gem is available as open source under the terms of the MIT License.