finds.dev

gitdagray/react_protected_routes

View on GitHub

★ 366JavaScriptupdated Feb 2024

// the take

This is the companion code for Dave Gray's YouTube tutorial on React role-based route protection, pairing a React frontend with a JWT-based Node/Express auth backend (in a separate repo). It's for people following the video course step by step, not for anyone looking for a drop-in auth solution.

Demonstrates a reasonably realistic auth pattern for a tutorial: access/refresh token split, roles array on the user object, a RequireAuth wrapper component gating routes by role, and axios instances split into public vs private (with interceptor-based token refresh) rather than one global client.

There's no README beyond links to YouTube videos and course upsells — no setup instructions, no explanation of the RequireAuth logic, no docs on how roles are structured or extended. It's tightly coupled to a companion backend repo that isn't vendored or pinned here, so the code won't run standalone. Last pushed February 2024 with no commits since, and the repo exists purely to mirror a video, so issues or PRs are unlikely to get attention. Not something to build on; if you already know the pattern, the actual value is a 15-minute skim of RequireAuth.js and AuthProvider.js, not cloning the repo.

We read the README, the directory tree and a key source file in September 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
366
Forks
235
Language
JavaScript
Last commit
25 Feb 2024

// nearby

If react_protected_routes isn't quite it.

All repos →