React Router OAuth2 Handbook

A practical, modern guide to implementing OAuth2 authentication in React Router and Remix apps—built on patterns you can apply to any web application.

⬇️ View the packages

What’s inside

📘 47-page handbook
A concise, no-fluff guide that walks you through the core concepts of OAuth2 and OpenID Connect using React Router v7 in framework mode. Learn how to implement secure auth flows, refresh tokens, and introspection endpoints — all in a modern full-stack app context.
🧪 Real World Example Application
You’ll get access to a complete React Router + OAuth2 example app that mirrors production use cases. From login screens to token storage strategies, it shows how everything fits together — with code you can run, read, and reuse.
🔒 Security-First Approach
OAuth2 is easy to get wrong. This book emphasizes the why behind each step, helping you avoid common pitfalls like insecure token handling or incorrect client configuration. Whether you're new to OAuth or want to level up, this will sharpen your instincts.
🚀 Fast, Framework-Ready Setup
Built for devs using React Router in framework mode (like Remix), the patterns you’ll learn are ready to drop into your stack. No boilerplate. No guessing. Just a focused, modern approach to authentication that respects both DX and security.

Get a Free Sample

Get a peek at the content. Enter your email address and access a sample chapter.

No spam. Unsubscribe anytime.

Alem Tuzlak
I always learned enough of OAuth2 to get the job done, after reading this I finally understand how it works.

Alem Tuzlak

Co-founder of Forge 42


Get React Router OAuth2 Handbook

Choose the option that fits your needs — whether you're just looking to understand the core concepts or want the full experience with hands-on code and private support.

🚀 Complete Package

Everything you need to master OAuth2 with React Router in production-ready environments.

Includes:

  • 📘 The Book — 47-page guide in PDF and EPUB formats
  • 🧪 Example App — Web App, API, Authorization Server, and E2E tests
  • 💬 Private Discord Access — Get support, ask questions, and connect with other devs

Whether you're building an internal tool, a SaaS product, or integrating with a third-party identity provider, this package gives you the confidence and code to ship it right.

📘 The Book

Just the essentials. The complete 47-page guide in PDF and EPUB formats

If you want a clear, hands-on explanation of how to implement secure OAuth2 flows using React Router v7 — from login to token refresh and everything in between — this is your starting point.

Do you already have The Book?

Upgrade to the Complete Package

You only pay the difference and get access to the app + community.

Upgrade now →

About the Author

Hi, I’m Sergio — a full-stack developer working with TypeScript, React, and Rails to build scalable apps and secure APIs. I’ve spent years refining OAuth2 flows, deploying to Cloudflare, and optimizing systems from the backend to the edge.

Everything I write comes from real-world experience: things I’ve built, broken, and fixed. My goal is to share clear, practical insights that help other developers ship better code with confidence.

Sergio Xalambrí

Frequently Asked Questions

What do I need to know before reading this book?
You should be comfortable with React Router. While the concepts are framework-agnostic, the example app uses React Router v7 in framework mode. If you know another framework, you’ll still be able to follow along — just expect some differences in routing.
Does this work with Remix or other frameworks?
Yes. The patterns and flows described are not tied to any specific framework. While the example app uses React Router, the principles apply to Remix, Next.js, SvelteKit, and others
Does it cover login with Google, GitHub, etc.?
The book focuses on the Authorization Code flow with PKCE, which underpins most third-party logins. Once you understand that, adapting it to use providers like Google or GitHub is straightforward
What’s the difference between the book and the complete package?
The book includes the full 46-page guide in PDF and EPUB formats. The Complete Package adds a working example app (web, API, auth server, and tests) plus private Discord access for questions and support.
Can I use the example app in production?
The example app is designed for learning purposes. While it reflects real-world practices, I only recommend using the web app portion as a starting point. The API and Authorization Server are simplified and meant to illustrate concepts — not for production use.
What am I allowed to do with the example codebase?
The example app is provided for educational purposes only. You're welcome to explore, adapt, and learn from it — but please don’t redistribute or repackage it commercially.
Can I purchase multiple licenses for my team at a reduced price?
Yes! Reach out to me at hello@sergiodxa.com with the number of seats you need, and I’ll send you a custom team offer.
What if I get stuck or have questions?
If you buy the Complete Package, you’ll be invited to a private Discord server where you can ask questions and get support directly from me and the community.
Does the book or package include support for purchasing power parity (PPP) pricing?
Support for PPP pricing will be available after the early access period. If you’re in a country with lower purchasing power, you’ll be able to use a discount code to get "The Book" package at a reduced price. During early access, the "Complete" package is offered at the highest discount it will ever receive. Other discounts may be available later, but none will be as generous — and PPP will not apply to it.