Shopify / Shopify/shopify-app-template-php

Update README/documentation to clarify how sessions work.

Open
#449 0 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

The current template documentation could be updated to provide clarity on how multi-tenant applications should handle resource ownership in Shopify apps.

Currently, there is a sessions table as well as a corresponding Session model, but no User model or users table which comes standard in fresh installations of Laravel. Documentation could be updated to address the following questions:

  • Does Session replace User? Is it safe to create foreign key constraints against a session?
  • How are the user_* columns in the sessions table populated? Am I supposed to populate those fields myself or is there underlying code that does so automatically?
  • Are sessions unique per shop? Can a shop have multiple sessions?
  • How do I get the current authenticated session/shop/user? Typically this used to be done with $request->user() or \Illuminate\Facades\Auth::user(), but using either results in an error.

Type

  • New feature
  • Changes to existing features

Motivation

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

I created a fresh application using this template but couldn't find any guidance on if sessions have a unique one-to-one with a shop/user or not.


Checklist

  • I have described this feature request in a way that is actionable (if possible)

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 README/documentation, then inspect the sessions table and Session model referenced in the issue. Verify how user_* fields, session uniqueness, and current authenticated shop or user are handled, including the behavior of $request->user() and Auth::user(). Done means documenting clear answers to each listed question for fresh Shopify app installations.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.