Skip to content

HyperSprite/react-firebase-auth-storybook-hack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Google Sign: React + Firebase + Storybook

Publish Storybook behind google auth sign in on Firebase.

Besides this repo, you'll need to npm install -g firebase-tools

Configure the .env and drop your built storybook into public/storybook and it should just work.

Setup

Copy .env-template to .env and configure it with the settings from your Firebase app:

REACT_APP_API_KEY="get from firebase app"
REACT_APP_AUTH_DOMAIN="get from firebase app"
REACT_APP_DATABASE_URL="? maybe, get from firebase app"
REACT_APP_PROJECT_ID="get from firebase app"
REACT_APP_STORAGE_BUCKET="get from firebase app"
REACT_APP_MESSAGING_SENDER_ID="get from firebase app"
REACT_APP_APP_ID="get from firebase app"
REACT_APP_MEASUREMENT_ID="get from firebase app"

REACT_APP_COMPANY_EMAIL_DOMAIN="your-company-email.com domain"
REACT_APP_SITE_TITLE="Site title, can be anything"
PORT="3030"

After building you can deploy to Firebase with

# do this once
npm install -g firebase-tools
firebase login
firebase init
# down arrow to Hosting, press space bar to select, then enter
# crate a new project ? depends if you have one already
# y to /index.html
# no to auto deploy
# no to overwrite public/index.html

Answers:

  • down arrow to Hosting, press space bar to select, then enter
  • crate a new project ? depends if you have one already
  • y to /index.html
  • no to auto deploy
  • no to overwrite public/index.html

Release

yarn release

This runs runs yarn build && firebase deploy

Available Scripts

In the project directory, you can run:

yarn start

Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.

The page will reload if you make edits.
You will also see any lint errors in the console.

yarn test

Launches the test runner in the interactive watch mode.
See the section about running tests for more information.

yarn build

Builds the app for production to the build folder.
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.
Your app is ready to be deployed!

See the section about deployment for more information.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published