Add a warning about including `mintAdminToken`

Open
#289 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
52/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Stale
Tech stack
firebase, javascript, node.js

Research direction

Start with firestore/solution-deletes/functions/index.js at the linked example around line 19, and inspect how mintAdminToken and recursiveDelete are presented. Make the production risk explicit and ensure the example is not directly copy-pasteable; confirm the resulting snippet still communicates the deletion workflow safely.

Written by the indexing model from the issue text.

Description

Thanks for these amazing snippets but I feel like there should be a warning about including this in any production environment since the combination of mintAdminToken and recursiveDelete would enable to anyone blasting an entire production database.

I suggest you create an example that isn't copy-pasteable.

https://github.com/firebase/snippets-node/blob/ea3747eee572d3e1bebd1cdafda9fa34a6dc38f0/firestore/solution-deletes/functions/index.js#L19

Dominant language
JavaScript
Stars
395
Forks
139
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from firebase/snippets-node

All issues in firebase/snippets-node

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.