Shopify / Shopify/shopify-app-template-react-router

Using middleware for authentication

Open
#11 8 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
197
Forks
68
Avg merge
4d 21h
Merged PRs (30d)
4

Description

Hi !

One of the biggest imporvement of React Router 7 is the support for middlewares. Middlewares should allows moving the authenticate to a single middleware, hence removing the need to call authenticate on every loader. However it does not seem to be used in this template. Any reason why?

Thanks

Contributor guide

Open the contributing guide

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 by reviewing how authenticate is called from each loader and compare that with React Router 7 middleware support. Determine whether this template can centralize authentication in middleware, then verify that protected routes retain the same behavior without individual loader calls.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
authentication
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.