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

Update tool to use gcloud auth instead of requiring credentials.json #6

Open
2 tasks
willhlaw opened this issue Jan 29, 2018 · 0 comments
Open
2 tasks

Comments

@willhlaw
Copy link
Owner

Right now, this tool requires a service account credentials.json file to be specified to be able to access Google Firestore rules API. I think we should update it to allow gcloud auth instead or as an alternative.

However, I have verified it works if we do the following:

  1. npm install -g @google-cloud/cloud-sdk
  2. open new terminal so gcloud is on the PATH
  3. run gcloud auth application-default login and gcloud config set project [PROJECT_NAME]

After that, we do not need credentials.json if we update firestore-backup-restore to initialize firebase with:

  1. Firebase.initializeApp({ credential: Firebase.credential.applicationDefault(), databaseURL: 'https://[PROJECTDB_NAME].firebaseio.com' })
  • Try to InitializeApp with default application credential if no path to credentials.json given
  • Update README with gcloud auth instructions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant