Sha256: a68e9ebbca6bd52e27dc36afc8cc69878fe4ccdbdf583b5b784066a015b804e6

Contents?: true

Size: 581 Bytes

Versions: 1

Compression:

Stored size: 581 Bytes

Contents

# You should replace InMemorySessionStore with what you will be using
# in Production
#
# 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 = Shop.new(domain: session.url, token: session.token)
#     shop.save!
#     shop.id
#   end
#
#   def retrieve(id)
#     shop = Shop.find(id)
#     ShopifyAPI::Session.new(shop.domain, shop.token)
#   end
# end

ShopifySessionRepository.storage = InMemorySessionStore

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shopify_app-5.0.0 lib/generators/shopify_app/templates/config/initializers/shopify_session_repository.rb