Shopify / Shopify/shopify-app-template-php

Enable public route that doesn't require authentication

Open
#411 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
340
Forks
108
PR merge metrics
No merged PRs in 30d

Description

Overview

Allow public routes to pass without having to go through Shopify's authentication/requirements

Type

  • Changes to existing features

Motivation

What inspired this feature request? What problems were you facing?

I'm trying to recreate Shopify Example App in Laravel from scratch since there seems to be only node version available.

I came across the feature where scanning the QR code as a public URL will redirect to our server to update the scan counter.

However, at the moment, it seems as if all routes created will go through Shopify's authentication process and requirements.
So even if I create a route without including the middleware shopify.auth it will still fail

Route::get('/qrcodes/{code}/scans', [ScanController::class, 'show']);

I will see the following error screen

Xnapper-2023-01-04-16 13 12

Would like to know what is the recommended way to create a public URL?

Thanks for your assistance in advance.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Route::get('/qrcodes/{code}/scans', ...) entry point and trace how the shopify.auth middleware is applied. Verify how a QR-code request can reach the server without Shopify authentication while still updating the scan counter, and confirm the public route no longer shows the authentication error.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php
Domain
authentication, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.