Giter Club home page Giter Club logo

gatsby-firebase-simple-auth's Introduction

Hi there ๐Ÿ‘‹

gatsby-firebase-simple-auth's People

Contributors

dependabot[bot] avatar marcomelilli avatar mmelilli avatar thomasjanuta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gatsby-firebase-simple-auth's Issues

Suggestion: Using the single .env file for simplicity

Using the single .env file can save time, the only thing is adding either _DEV or _PRODUCTION suffix. This way, developers who use and fork your starter can use only one .env file, they just needed to add some flags or suffixes to know which secrets should be used based on the type of deployment.

## Production-ready secrets
GATSBY_FIREBASE_API_KEY_PRODUCTION=<YOUR_FIREBASE_API_KEY>
GATSBY_FIREBASE_AUTH_DOMAIN_PRODUCTION=<YOUR_FIREBASE_AUTH_DOMAIN>
GATSBY_FIREBASE_DATABASE_URL_PRODUCTION=<YOUR_FIREBASE_DATABASE_URL>
GATSBY_FIREBASE_PROJECT_ID_PRODUCTION=<YOUR_FIREBASE_PROJECT_ID>
GATSBY_FIREBASE_STORAGE_BUCKET_PRODUCTION=<YOUR_FIREBASE_STORAGE_BUCKET>
GATSBY_FIREBASE_MESSAGING_SENDER_ID_PRODUCTION=<YOUR_FIREBASE_MESSAGING_SENDER_ID>
GATSBY_FIREBASE_APP_ID_PRODUCTION=<YOUR_FIREBASE_APP_ID>
GATSBY_FIREBASE_MEASUREMENT_ID_PRODUCTION=<YOUR_FIREBASE_ANALYTICS_TRACKING_ID>

## Development secrets
GATSBY_FIREBASE_API_KEY_DEV=<YOUR_FIREBASE_API_KEY>
GATSBY_FIREBASE_AUTH_DOMAIN_DEV=<YOUR_FIREBASE_AUTH_DOMAIN>
GATSBY_FIREBASE_DATABASE_URL_DEV=<YOUR_FIREBASE_DATABASE_URL>
GATSBY_FIREBASE_PROJECT_ID_DEV=<YOUR_FIREBASE_PROJECT_ID>
GATSBY_FIREBASE_STORAGE_BUCKET_DEV=<YOUR_FIREBASE_STORAGE_BUCKET>
GATSBY_FIREBASE_MESSAGING_SENDER_ID_DEV=<YOUR_FIREBASE_MESSAGING_SENDER_ID>
GATSBY_FIREBASE_APP_ID_DEV=<YOUR_FIREBASE_APP_ID>
GATSBY_FIREBASE_MEASUREMENT_ID_DEV=<YOUR_FIREBASE_ANALYTICS_TRACKING_ID>

## Flag to use dev secrets instead: Set to true to continue
USE_DEV_SECRETS_ON_PROD=true

## Flag to use prod secrets on dev servers: Set true to continue.
## When both of these flags are enabled, they'll be used based on what deployment type does an dev used.
USE_PROD_SECRETS_ON_DEV=true

Add .env.sample + firebase steps required for smoother Dev experience

Great starter. It does exactly one thing and it works.

I had minor problems getting started because I had barely any firebase experience. I propose the following changes to enable a smooth dev experience:

  • Add .env.sample with sample environment variables
  • Add Getting firebase up and running into the README
    • inclues how to set up a project or at least a link to the official docs
    • includes that you have to enable email and google authentication in firebase
    • includes that you have to enable a web project and paste the credentials into the .env.sample in firebase

These links helped me and should be added to the README:

Should I go ahead and make a pull request?

Can't sign with Google in the demo

This domain (gatsby-firebase-simple-auth.netlify.app) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab. Dismiss

image

Trouble with gatsby-plugin-firebase v0.2

Hi Marco.
your gatsby starter looks really useful and works just fine, however I'm using it to learn how authentication works with firebase and gatsby. I'm trying to update the use of gatsby-plugin-firebase to the v0.2 (using useEffect instead of useFirebase in the login component) but the browser returns this error in .../app/login:

TypeError: gatsby_plugin_firebase__WEBPACK_IMPORTED_MODULE_5__.default.database is not a function

It seems like I need to create a react context to use firebase functions, but I don't really understand how it would work in your starter.
I hope you can help me, maybe this plugin update usage could be a nice upgrade to your starter.
Thanks!

--
note: I'm a designer learning how to code so I apologize if this is not the kind of issue you were expecting.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.