File: README.md

package info (click to toggle)
ruby-omniauth-tumblr 1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, stretch
  • size: 108 kB
  • ctags: 8
  • sloc: ruby: 105; makefile: 2
file content (55 lines) | stat: -rw-r--r-- 1,547 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
OmniAuth Tumblr
================

This gem is an OmniAuth 1.0 Strategy for authenticating with the [Tumblr API](http://developers.tumblr.com)

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


Setup
-----

Register your application with [Tumblr](http://www.tumblr.com/oauth/apps).

*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](https://groups.google.com/forum/?fromgroups#!searchin/tumblr-api/callback$20url/tumblr-api/5k_afNDUB5s/gfaNMnRtINoJ))

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`:

```ruby
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@:

```ruby
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:

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

License
-------

Copyright (c) 2011-2012 [Jamie Wilkinson](http://jamiedubs.com)

This source code released under an MIT license.