Socket
Book a DemoInstallSign in
Socket

@cloak-app/customer

Package Overview
Dependencies
Maintainers
6
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cloak-app/customer

Cloak components for rendering customer components.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
6
Created
Source

@cloak-app/customer

Cloak components for rendering Customer components.

  • View demo
  • Edit CodeSandbox

Install

  • Install with yarn add @cloak-app/customer
  • Add to nuxt.config with buildModules: ['@cloak-app/customer']
  • Make sure components is set to true in the project's nuxt.config so the components can be auto-loaded
  • Set Shopify admin api permissions
  • create a private 'develop' app
  • allow admin api access & allow permission to
  • write_customers
  • read_customers
  • Make sure accounts are at least set to optional on the shop (/admin/settings/checkout)
  • Redirect account pages to the nuxt site (this will need to be placed either in shopify-theme/main.coffee or shopify-theme/plugins/routing.coffee)
# Redirect account pages to www site
if match = location.pathname.match /^\/(account)/
then location.href = makeNuxtUrl location.pathname

Options

  • cloak.customer:
    • authenticatedRoute - The route to redirect users who aren't authenticated. Defaults to /account
    • unauthenticatedRoute - The route to redirect users who aren't authenticated. Defaults to /account/login
    • layout - The Nuxt layout to use within the customer pages. Defaults to default.

Expected project components

  • <btn>

Expected Styus vars

  • radius
  • spacing (xs - xxl)
  • ui-grey
  • primary-color
  • ui-error
  • tablet-up() and tablet-down() breakpoint helpers

Expected ENV vars

  • SHOPIFY_URL
  • APP_ENV
  • SHOPIFY_STOREFRONT_TOKEN

Module Options

Components

FAQs

Package last updated on 15 Sep 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts