The core rule
Protect the server, not just the screen. Hiding a button in React is useful for UX, but it does not stop someone from calling your API with Postman or curl.
Every private route must check who the user is before it reads or writes data.
What to protect
Protect two things: routes and records. A route check asks, “Is anyone signed in?” A record check asks, “Does this signed-in user own this data or have this role?”
For example, /dashboard needs a signed-in user. /api/orders/123 also needs to confirm that order 123 belongs to that user.