/omniauth-withings

OmniAuth strategy for authenticating to Fitbit using their OAuth API.

Primary LanguageRubyMIT LicenseMIT

OmniAuth Withings Strategy

This gem is an OmniAuth 1.0+ Strategy for the Withings API.

Usage

Add the strategy to your Gemfile:

gem 'omniauth-withings'

Then integrate the strategy into your middleware:

use OmniAuth::Builder do
  provider :withings, 'consumer_key', 'consumer_secret'
end

In Rails, create a new file under config/initializers called omniauth.rb to plug the strategy into your middleware stack.

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :withings, 'consumer_key', 'consumer_secret'
end

Example Application

There is an example Sinatra application in spec/integration_app.rb

Withings API Credentials and other info

To register your application with Withings and obtain a consumer key and secret, go to the Withings application registration.

For additional information about OmniAuth, visit OmniAuth wiki.

For a short tutorial on how to use OmniAuth in your Rails application, visit this tutsplus.com tutorial.

Copyright

Copyright (c) 2013 O.C. Tanner. See LICENSE for details.