Sha256: 58a50aadb40a94bf0b986d329f04171ce680a932ddeebe59e319739097560ad7

Contents?: true

Size: 615 Bytes

Versions: 11

Compression:

Stored size: 615 Bytes

Contents

require "shopify_cli"

module ShopifyCli
  module Commands
    class Logout < ShopifyCli::Command
      LOGIN_TOKENS = [
        :identity_access_token, :identity_refresh_token, :identity_exchange_token,
        :admin_access_token, :admin_refresh_token, :admin_exchange_token
      ]

      def call(*)
        LOGIN_TOKENS.each do |token|
          ShopifyCli::DB.del(token) if ShopifyCli::DB.exists?(token)
        end
        @ctx.puts(@ctx.message("core.logout.success"))
      end

      def self.help
        ShopifyCli::Context.message("core.logout.help", ShopifyCli::TOOL_NAME)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
shopify-cli-1.14.0 lib/shopify-cli/commands/logout.rb
shopify-cli-1.13.1 lib/shopify-cli/commands/logout.rb
shopify-cli-1.13.0 lib/shopify-cli/commands/logout.rb
shopify-cli-1.12.0 lib/shopify-cli/commands/logout.rb
shopify-cli-1.11.0 lib/shopify-cli/commands/logout.rb
shopify-cli-1.10.0 lib/shopify-cli/commands/logout.rb
shopify-cli-1.9.1 lib/shopify-cli/commands/logout.rb
shopify-cli-1.9.0 lib/shopify-cli/commands/logout.rb
shopify-cli-1.8.0 lib/shopify-cli/commands/logout.rb
shopify-cli-1.7.1 lib/shopify-cli/commands/logout.rb
shopify-cli-1.7.0 lib/shopify-cli/commands/logout.rb