Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Developer Workflow: Stubbing authentication #175

Open
daniel-sudz opened this issue May 7, 2021 · 3 comments · May be fixed by #180
Open

Improve Developer Workflow: Stubbing authentication #175

daniel-sudz opened this issue May 7, 2021 · 3 comments · May be fixed by #180
Assignees
Labels
BLOCKING Impedes the development of this repo important Top priority

Comments

@daniel-sudz
Copy link
Member

daniel-sudz commented May 7, 2021

Is your feature request related to a problem? Please describe.
So people should be able to work on admin features, but shouldn't be able to wreck the production database. So we need to stub the database in development.

This is now supported:
firebase/firebase-tools#1677 (comment)

https://firebase.google.com/docs/emulator-suite/connect_auth
https://firebase.google.com/docs/emulator-suite/install_and_configure

We can import a mock database like so:
https://stackoverflow.com/a/62977147

Although, generating the initial state and exporting it to a valid blob format has to be done manually.

@daniel-sudz daniel-sudz added the important Top priority label May 7, 2021
@daniel-sudz daniel-sudz pinned this issue May 7, 2021
@daniel-sudz daniel-sudz added the BLOCKING Impedes the development of this repo label May 7, 2021
@daniel-sudz
Copy link
Member Author

in progress

@theTisch21
Copy link
Member

Is there an environment variable in netlify, like "NODE_ENV=Production"? If so, we could have our code check for that, and if it's set to "Production", to use firebase authentication like usual, but if it's set to "development", to deny access to the production database and instead use the emulator.

@theTisch21
Copy link
Member

This will be a lot easier once we update firebase #107

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BLOCKING Impedes the development of this repo important Top priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants