A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/dja/omniauth-square below:

dja/omniauth-square: Omniauth Strategy for Square

This gem contains the Square strategy for OmniAuth.

Square uses the OAuth2 flow, you can read about it here: http://connect.squareup.com

So let's say you're using Rails, you need to add the strategy to your Gemfile:

gem 'omniauth-square', '~> 2.0.0'

You can pull it in directly from github (if you really want to) e.g.:

gem 'omniauth-square', :git => 'https://github.com/dja/omniauth-square.git'

Once these are in, you need to add the following to your config/initializers/devise.rb (NOTE: A full enumeration of Square Permissions can be found here.):

config.omniauth :square, "your_app_id", "your_app_oauth_secret", {:scope => "ITEMS_READ,ITEMS_WRITE"}

Sandbox Example:

 config.omniauth :square, "your_app_id", "your_app_oauth_secret", {:scope => "ITEMS_READ,ITEMS_WRITE", :client_options => {:connect_site => 'https://connect.squareupsandbox.com', :site => 'https://squareupsandbox.com'}}

You will obviously have to put in your key and secret, which you get when you register your app with Square (they call them Application Key and Secret Key).

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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4