OmniAuth OAuth2 strategy for Fitbit

This gem is an OAuth2 OmniAuth Strategy for the Fitbit API.

Gem Status

Gem Version Build Status

Installing

Add to your Gemfile:

gem 'omniauth-fitbit-oauth2'

Then bundle install.

Usage

OmniAuth::Strategies::FitbitOauth2 is simply a Rack middleware. Read the OmniAuth 2.0 docs for detailed instructions.

Here's a quick example, adding the middleware to a Rails app in config/initializers/omniauth.rb:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :fitbit_oauth2, ENV['FITBIT_CLIENT_ID'], ENV['FITBIT_CLIENT_SECRET']
end