The Road to React with Firebase


This book is no longer available for sale.

The Road to React with Firebase

Your journey to master advanced React for business web applications

About the Book

The book is work in progress. So far, you will build a whole authentication flow in Firebase and plain React. It includes sign up, sign in and sign out. As extra on top you will implement the password change/reset features too. Furthermore, you will learn about authorization by protecting routes in React Router based on a user's permission and roles. Moreover, you will learn how to use Firebase's realtime database to setup your user management. Everything in plain React with Firebase. Afterward, you can dive into the bonus material to setup everything with Redux or MobX as your state layer.

In order to make it a comprehensive experience, I plan to add more chapters about the realtime database in Firebase by implementing a chat application for authenticated users. In addition, there might be a bonus chapter about styling all of these authentication related components (e.g. with styled components or/and Semantic UI). Last but not least, there will be a chapter on how to deploy it to the Firebase cloud.

Table of Contents

  • React Application Setup: create-react-app
  • React Router and Routes
  • Firebase Authentication in React
  • Firebase in React Setup
  • Firebase’s Authentication API
  • Sign Up with React and Firebase
  • Sign In with React and Firebase
  • Sign Out with React and Firebase
  • Session Handling in React Components
  • Session Handling in React with Higher Order Components
  • Password Reset and Password Change with Firebase
  • Authorization in React
  • Protected Routes in React with Authorization
  • Firebase Database in React
  • User Management with Firebase’s Database in React
  • What’s next?
  • Bonus: Authentication in React, Firebase and Redux
  • Bonus: Authentication in React, Firebase and MobX

About the Author

Robin Wieruch
Robin Wieruch

Robin Wieruch is a german software engineer and freelancer located in Berlin. In the recent years he has gained experiences in single page applications which use Ember, Angular and React. He is a full-time JavaScript developer, is doing his best to teach students on his blog and strives to learn something new every day himself.

Table of Contents

  • Introduction
    • About the Author
    • Requirements
    • FAQ
    • How to read this Book
  • Application Setup
  • React Router in React
  • Firebase
  • Firebase in React
  • Firebase’s Authentication API
    • Sign Up with React and Firebase
    • Sign In with React and Firebase
    • Sign Out with React and Firebase
    • Session Handling
    • Session Handling with Higher-Order Components
  • Password Management
    • Password Forget
    • Password Change
  • Authorization (1): General Authorization and Route Protection
  • Firebase Realtime Database (1): Basic
    • User Management with Firebase
  • Authorization (2): Roles and Permissions
    • Database Users with Roles
    • How to merge authenticated user with database user?
    • Authorize a Firebase User based on a Role
  • Session Persistence
  • Social Logins
    • Troubleshoot
    • Google Social Login
    • Facebook Social Login
    • Twitter Social Login
    • Linking Social Logins to one Account
  • Email Verification
  • Admin Dashboard
  • Firebase Realtime Database (2): Advanced
    • Defining the API
    • How to fetch a List
    • Creating an Item in a List
    • Relationships
    • Removing an Item in a List
    • Editing an Item in a List
    • Securing User Interactions
    • Ordering
    • Pagination
  • Firebase Hosting
  • How to continue your Journey …
  • Thank You

Authors have earned$10,098,681writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.

Learn more about writing on Leanpub

The Leanpub 45-day 100% Happiness Guarantee

Within 45 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

See full terms

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses! Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks. Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. It really is that easy.

Learn more about writing on Leanpub