Sha256: b61588d3b69df2c34eba81c62970b55cc66a52222f9901190d5a6449a5ccfdbf

Contents?: true

Size: 697 Bytes

Versions: 41

Compression:

Stored size: 697 Bytes

Contents

# You should replace InMemorySessionStore with what you will be using
# in Production. For example a model called "Shop":
#
# ShopifySessionRepository.storage = 'Shop'
#
# Interface to implement are self.retrieve(id) and self.store(ShopifyAPI::Session)
# Here is how you would add these functions to an ActiveRecord:
#
# class Shop < ActiveRecord::Base
#   def self.store(session)
#     shop = self.new(domain: session.url, token: session.token)
#     shop.save!
#     shop.id
#   end
#
#   def self.retrieve(id)
#     if shop = self.where(id: id).first
#       ShopifyAPI::Session.new(shop.domain, shop.token)
#     end
#   end
# end

ShopifyApp::SessionRepository.storage = InMemorySessionStore

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
shopify_app-7.4.0 lib/generators/shopify_app/install/templates/shopify_session_repository.rb
shopify_app-7.3.0 lib/generators/shopify_app/install/templates/shopify_session_repository.rb
shopify_app-7.2.11 lib/generators/shopify_app/install/templates/shopify_session_repository.rb
shopify_app-7.2.10 lib/generators/shopify_app/install/templates/shopify_session_repository.rb
shopify_app-7.2.9 lib/generators/shopify_app/install/templates/shopify_session_repository.rb
shopify_app-7.2.8 lib/generators/shopify_app/install/templates/shopify_session_repository.rb
shopify_app-7.2.7 lib/generators/shopify_app/install/templates/shopify_session_repository.rb
shopify_app-7.2.6 lib/generators/shopify_app/install/templates/shopify_session_repository.rb
shopify_app-7.2.5 lib/generators/shopify_app/install/templates/shopify_session_repository.rb
shopify_app-7.2.3 lib/generators/shopify_app/install/templates/shopify_session_repository.rb
shopify_app-7.2.0 lib/generators/shopify_app/install/templates/shopify_session_repository.rb
shopify_app-7.1.1 lib/generators/shopify_app/install/templates/shopify_session_repository.rb
shopify_app-7.1.0 lib/generators/shopify_app/install/templates/shopify_session_repository.rb
shopify_app-7.0.11 lib/generators/shopify_app/install/templates/shopify_session_repository.rb
shopify_app-7.0.10 lib/generators/shopify_app/install/templates/shopify_session_repository.rb
shopify_app-7.0.9 lib/generators/shopify_app/install/templates/shopify_session_repository.rb
shopify_app-7.0.8 lib/generators/shopify_app/install/templates/shopify_session_repository.rb
shopify_app-7.0.7 lib/generators/shopify_app/install/templates/shopify_session_repository.rb
shopify_app-7.0.6 lib/generators/shopify_app/install/templates/shopify_session_repository.rb
shopify_app-7.0.5 lib/generators/shopify_app/install/templates/shopify_session_repository.rb