omniauth-artsy

Build Status

Artsy OAuth2 Strategy for OmniAuth.

Installation

Add to your Gemfile:

gem 'omniauth-artsy'

Then run bundle install.

Usage

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

Add the middleware to a Rails app in config/initializers/omniauth.rb:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :artsy, ENV['ARTSY_CLIENT_ID'], ENV['ARTSY_CLIENT_SECRET']
end

Configuration

Configure in your app

Add omniauth_artsy.rb to your config/initializers and set artsy_api_url.

# config/initializers/omniauth_artsy.rb
OmniAuth::Artsy.configure do |config|
  config.artsy_api_url = ENV['ARTSY_API_URL']
end
Using ENV

Set ENV['ARTSY_API_URL'] to the location of the Artsy API, typically https://api.artsy.net in production.

License

MIT License, see LICENSE for details.