Sha256: 76c3b78af0781712f61e87a20a31290bbb24f5653a624f726b492dfc736cdad5

Contents?: true

Size: 1.76 KB

Versions: 5

Compression:

Stored size: 1.76 KB

Contents

# OmniAuth OpenStreetMap

[![alt text][2]][1]

  [1]: http://travis-ci.org/#!/sozialhelden/omniauth-osm
  [2]: https://secure.travis-ci.org/sozialhelden/omniauth-osm.png


This gem contains the OpenStreetMap strategy for OmniAuth.

OpenStreetMap uses the OAuth 1.0a flow, you can read about it here: http://wiki.openstreetmap.org/wiki/OAuth

## How To Use It

Usage is as per any other OmniAuth 1.0 strategy. So let's say you're using Rails, you need to add the strategy to your `Gemfile` along side omniauth:

    gem 'omniauth'
    gem 'omniauth-osm'

Of course if one or both of these are unreleased, you may have to pull them in directly from github e.g.:

    gem 'omniauth', :git => 'https://github.com/intridea/omniauth.git'
    gem 'omniauth-osm', :git => 'https://github.com/sozialhelden/omniauth-osm.git'

Once these are in, you need to add the following to your `config/initializers/omniauth.rb`:

    Rails.application.config.middleware.use OmniAuth::Builder do
      provider :osm, "consumer_key", "consumer_secret"
    end

If you are using devise, this is how it looks like in your `config/initializers/devise.rb`:

    config.omniauth :osm, "consumer_key", "consumer_secret"

You will obviously have to put in your key and secret, which you get when you register your app with OpenStreetMap.

Now just follow the README at: https://github.com/intridea/omniauth

## Note on Patches/Pull Requests

- Fork the project.
- Make your feature addition or bug fix.
- Add tests for it. This is important so I don’t break it in a future version unintentionally.
- Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
- Send me a pull request. Bonus points for topic branches.

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
omniauth-osm-0.3.0 README.md
omniauth-osm-0.2.1 README.md
omniauth-osm-0.2.0 README.md
omniauth-osm-0.1.3 README.md
omniauth-osm-0.1.2 README.md