Skip to content

dropstream/omniauth-shopline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OmniAuth Shopline

This is an OmniAuth strategy for authenticating with Shopline using OAuth2.

Installation

Add this line to your application's Gemfile:

gem 'omniauth-shopline'

And then execute:

$ bundle

Or install it yourself as:

$ gem install omniauth-shopline

Usage

Add the strategy to your Gemfile alongside OmniAuth:

gem 'omniauth'
gem 'omniauth-shopline'

Then integrate the strategy into your middleware:

use OmniAuth::Builder do
  provider :shopline, 'your_app_key', 'your_app_secret', {
    handle: 'your_shopline_handle',
    scope: 'read_products,read_orders'
  }
end

Configuration

  • handle: Your Shopline store handle (required)
  • scope: Comma-separated list of permissions (optional, defaults to 'read_products')

Auth Hash

The auth hash will contain:

{
  provider: 'shopline',
  uid: 'user_id',
  info: {},
  credentials: {
    token: 'access_token',
    expires_at: '2023-11-10T16:37:48.178+00:00',
    scope: 'read_products,read_orders'
  },
  extra: {
    handle: 'your_shopline_handle',
    scope: 'read_products,read_orders'
  }
}

License

The gem is available as open source under the terms of the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages