17 subscribers
Go offline with the Player FM app!
Securing Routes in React Router Framework
Manage episode 479697702 series 2982717
I’m transitioning from SPAs with REST APIs to SSR applications using React Router Framework. While I’ve used layout routes and tools like SWR/React Query for route protection in React Router DOM, I just found out that actions in React Router Framework are still vulnerable to unauthorized POST requests. I use JWT auth with tokens stored in cookies—do I need to verify the JWT in every action on each route, or is there a global solution like Fastify’s onRequest hook?
- React Router v7.3.0 changelog which introduces middleware support
213 episodes
Manage episode 479697702 series 2982717
I’m transitioning from SPAs with REST APIs to SSR applications using React Router Framework. While I’ve used layout routes and tools like SWR/React Query for route protection in React Router DOM, I just found out that actions in React Router Framework are still vulnerable to unauthorized POST requests. I use JWT auth with tokens stored in cookies—do I need to verify the JWT in every action on each route, or is there a global solution like Fastify’s onRequest hook?
- React Router v7.3.0 changelog which introduces middleware support
213 episodes
All episodes
×
1 Does MCP make sense confined to a single app to rethink UX? 4:53

1 Stuck in Stack Switching: How Do You Commit to One? 5:14



1 Running audio in background while still offline 2:41

1 What do you think about mutation testing applied to components? 6:23

1 When is a Promise not good enough, and I need a Web Worker? 5:40


1 What are your thoughts about Qwik and hydration? 7:20


1 Does the testing trophy need updating for 2025? 10:17

1 Balancing Conventions and Flexibility in Large Codebases 6:54


1 How to keep Type-Safety when defering data from a Remix loader 4:21
Welcome to Player FM!
Player FM is scanning the web for high-quality podcasts for you to enjoy right now. It's the best podcast app and works on Android, iPhone, and the web. Signup to sync subscriptions across devices.