Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tylermcginnis/react-router-firebase-auth
Example of how to have protected routes with Firebase and React Router.
https://github.com/tylermcginnis/react-router-firebase-auth
firebase javascript protected-routes react
Last synced: 1 day ago
JSON representation
Example of how to have protected routes with Firebase and React Router.
- Host: GitHub
- URL: https://github.com/tylermcginnis/react-router-firebase-auth
- Owner: tylermcginnis
- Created: 2015-02-15T05:47:24.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-12-28T17:28:55.000Z (almost 7 years ago)
- Last Synced: 2024-12-13T20:11:23.443Z (9 days ago)
- Topics: firebase, javascript, protected-routes, react
- Language: JavaScript
- Homepage:
- Size: 36.1 KB
- Stars: 727
- Watchers: 34
- Forks: 183
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Auth with React Router V4 and Firebase V3
This is an example repo for authenticating with Firebase and React Router.For more info, visit [Protected routes and authentication with React Router v4](https://tylermcginnis.com/react-router-protected-routes-authentication/)
*Using React 15.4.0, React Router 4, and Firebase 3.6.1*
#### Features:
* Protected Routes with React Router
* Register new users with Firebase
* Add new users to ```/users``` in your Firebase database
* Login/Logout Functionality
* Simple Boostrap UI#### Instructions:
* Swap out the firebase config in ```config/constants``` with your own
* ```npm install```
* ```npm start```
* Visit ```localhost:3000```#### Try it out in a [Docker](https://www.docker.com/) container:
* Run a container running the prod version: `docker run -p 8080:80 -d allthethings/react-router-firebase-auth`
* **Or** build a dev version, locally: `docker build -t react-router-firebase-auth .`
* Then run the image (listens for changes to src): `docker run -v "$(pwd)/src:/code/src" -p 3000:3000 -d --name react-router-firebase-auth react-router-firebase-auth`