TheGiftsProject / omniauth-ebay

OmniAuth Strategy for Open eBay Apps
12 stars 16 forks source link

OmniAuth eBay Build Status

OmniAuth-Ebay!

In this gem you will find an OmniAuth eBay strategy that is compliant with the Open eBay Apps API. You can read all about it here: Open eBay Apps Developers Zone

Usage

Note: The examples are for a Rails 3 app.

gem 'omniauth-ebay'

    Rails.application.config.middleware.use OmniAuth::Builder do
       provider :ebay, "runame", "devid", "appid", "certid", "siteid", "environment", "auth_type"
    end

Insert your app credentials in the given order. You can find out these details by going into your developer's account at eBay DevZone

environment - Defaults to :production and other valid option is :sandbox

auth_type - An optional argument when initializing the strategy, by default it's configured to SSO(SingleSignOn), and should be changed to AuthType::Simple (SignIn), as it's the standard option.

Requirements

Ruby 1.8.7+, Rails 3.0+, OmniAuth 1.0+.

How it Works

The ebay strategy module uses the standard omniauth strategy module, and it also uses a small module designed just for the eBay API calls.

Request Phase

Callback Phase

ebay_id - The user's eBay username.

ebay_token - The current session's auth token, to be used for API calls.

email - The user's email address.

full_name - The user's registered full name.

country - The user's registered country.