Maximus%20Agency
Maximus%20Agency
  • How We Work
  • Services
    • Development

      • Web Development
      • Mobile App Development
      • Shopify Development
      • CRM Development

      Marketing

      • Social Media Marketing
      • Direct Digital Marketing
      • Paid Advertising
      • Brand Strategy & Design

      IT Consulting

      • DevOps
      • Managed IT Services
      • Digital Transformation
      • Cloud Managed Services
      • AWS Services
      Banner

  • Portfolio
  • FAQ
  • Contact Us
  • ADDRESS

    Baldivis, Perth, Western Australia
  • EMAIL

    hello@maximus.agency

Stay Ahead with Tech Insights

Getting started with Shopify Slate & Localhost SSL

Home / Getting started with Shopify Slate & Localhost SSL
  • 25 May 2018
  • grant
  • 63 Views

I’m quite new to the local development scene when it comes to Shopify templates, I’m aware that there was something in the past called Theme Kit and that currently Slate is the new kid on the block. Kudos to Shopify for thinking of us developers. Two things that I bumped my head on, that may assist others:

1) Localhost SSL, no mixed content issues and browsersync updates automatic on saves.

2.) Lots of people seem to be getting stuck at the “Log in” point once they do get a local environment up.

So let’s address both of these issues and I’ll show you how I managed to overcome them.

Firstly, what a wonderful movement LetsEncrypt.org has become, here’s their instructions on how to generate a self-signed localhost SSL certificate and key: https://letsencrypt.org/docs/certificates-for-localhost/

Copy and paste this into your terminal and you’re set like jelly (or jello if you’re American).

openssl req -x509 -out localhost.crt -keyout localhost.key \
-newkey rsa:2048 -nodes -sha256 \
-subj '/CN=localhost' -extensions EXT -config <( \
printf "[dn]\nCN=localhost\n[req]\ndistinguished_name = dn\n[EXT]\nsubjectAltName=DNS:localhost\nkeyUsage=digitalSignature\nextendedKeyUsage=serverAuth")

You will now have both a .crt and a .key file, double-click the .crt one and you’ll notice it pop up in your Keychain. Open it up in by double-clicking it in your Keychain and then toggle down the Trust subsection, and you can either allow SSL alone, or just allow the lot.

Who has time to be paranoid? Just trust everyone and everything, it’s 2018!

So, it was at this point where I thought to myself, so it’s trusted, why isn’t it working? Is this some Chrome thing? Do I even know what I’m doing? FML, why did I choose programming. Turns out, just like any virtual host or server app you have to ensure that the certificate is being pointed to in your gulp / browsersync process. Find your deploy-sync.js file:

Go to the middle and add these two lines, after the proxy object like so:

https: {
key: "/Users/grant.brits/localhost.key",
cert: "/Users/grant.brits/localhost.crt"
},

Now when this proxy is spun up, it comes identity loaded

Throw a chrome://restart into the browser for good measure and then give it a whirl with either slate start or slate watch the latter does the gulp process without deploying.

Ahhh, green padlock ❤

Unfortunately, you’re now met with this, right?

WTH SHOPIFY!? How log in bro? Nothing password work?!

Well, fear not. This is so that you can style up the password page of your Shopify site, perhaps an essential part of your theme development. However, the solution is simple, it’s your *store* password, not your Shopify admin password. Pop it in once you have the SSL set up right and you should be able to mosey right on in.

Happy theming, give me a clap if I helped you out on setting up!

Share:

Previous Post
Easy Auto
Next Post
Using Ionic

Comments are closed

Recent Posts

  • How Shopify POS and QR Codes Transformed Inventory Management
  • Securing Your WordPress: A Step-by-Step Guide to Recovery and Hardening After a Hack
  • LinkedIn Open Graph Image Challenges: Navigating Cloudflare
  • Upgrade Ionic 4 to Ionic 5 (Angular)
  • Getting Rid of the Admin Bar in WordPress for Front End

Recent Comments

No comments to show.

Recent Post

  • 24 October 2024
    How Shopify POS and
  • 4 September 2024
    Securing Your WordPress: A
  • 24 November 2023
    LinkedIn Open Graph Image

Category List

  • Uncategorised 2

Tags

Maximus%20Agency
  • Perth Office

    Baldivis, Western Australia, 6171

Services

  • Web Development
  • Mobile App Development
  • Shopify Development
  • Custom CRM Development
  • Cloud Managed Services
  • Managed IT Services
  • Digital Transformation Services
  • AWS Services
  • DevOps Services
  • Direct Digital Marketing
  • Social Media Marketing
  • Paid Advertising Services
  • Brand Strategy & Design
  • hello@maximus.agency

2025 Maximus Agency  Terms | Privacy | SiteMap