0.03
Repository is archived
No commit activity in last 3 years
No release in over 3 years
OmniAuth strategy for Tumblr
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

OmniAuth Tumblr

This gem is an OmniAuth 1.0 Strategy for authenticating with the Tumblr API

An example Rails application is available: https://github.com/jamiew/omniauth-rails-app

Setup

Register your application with Tumblr.

Important: your callback URL needs to be specified as http://[hostname]/auth/tumblr/callback. The Tumblr API does not respect the dynamic ?oauth_callback URL passed by Omniauth. (related thread)

In order to authenticate with Tumblr in both development and production we recommend registering a "-dev" app with Tumblr which points at localhost:3000 or yourapp.dev (not ideal)

Using services like https://ngrok.com works like a charm.

Usage

Get started by adding the Tumblr strategy to your Gemfile:

gem 'omniauth-tumblr'

In a Rails app, add the Tumblr provider to your Omniauth middleware, e.g. in a file like @config/initializers/omniauth.rb@:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :tumblr, ENV['TUMBLR_KEY'], ENV['TUMBLR_SECRET']
end

In any Rack app you can add the Tumblr strategy like so:

use OmniAuth::Builder do
  provider :tumblr, ENV['TUMBLR_KEY'], ENV['TUMBLR_SECRET']
end

License

Copyright (c) 2011-2012 Jamie Wilkinson

This source code released under an MIT license.