Gatsby Starter with Firebase simple auth workflow and private routes
MIT License
This is a gatsby starter to show how an authentication workflow is implemented in Gatsby using Firebase as authentication provider.
This starter follows the best practices described in the official gatsby site:
It uses Gatsby Plugin Create Client Path to set private routes.
How it works in short:
Copy and rename .env.sample
to .env.development
and .env.production
in your root directory. Use these environment variables for Firebase:
FIREBASE_API_KEY=<YOUR_FIREBASE_API_KEY>
FIREBASE_AUTH_DOMAIN=<YOUR_FIREBASE_AUTH_DOMAIN>
FIREBASE_DATABASE_URL=<YOUR_FIREBASE_DATABASE_URL>
FIREBASE_PROJECT_ID=<YOUR_FIREBASE_PROJECT_ID>
FIREBASE_STORAGE_BUCKET=<YOUR_FIREBASE_STORAGE_BUCKET>
FIREBASE_MESSAGING_SENDER_ID=<YOUR_FIREBASE_MESSAGING_SENDER_ID>
FIREBASE_APP_ID=<YOUR_FIREBASE_APP_ID>
GATSBY_
npm install
gatsby develop
If you want to contribute to this starter, consider:
All contributions are welcome!