Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Cloud: Firebase App Check

Đang mở
#798 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
42/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
firebase, typescript
Lĩnh vực
cloud, security

Hướng nghiên cứu

Start in src/firebase/ and review dependency #787 before tracing the existing Firebase setup. Run the listed unit and E2E commands, then verify the production build on a Hosting preview; done means local debug-token workflows pass, the setup is documented in docs/cloud-storage.md, and enforcement is enabled only after monitoring.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Summary

Enable Firebase App Check so the public client configuration cannot be used by a script hitting
the Firestore and Storage APIs directly, outside the app.

Why

The Firebase client config ships in client JavaScript and is not a secret. Security rules stop an
attacker from reading other people's data, but an allowlisted user could still script against
the API directly and, for example, hammer writes to inflate cost. App Check attests that requests
originate from the genuine web app.

Scope

  • reCAPTCHA Enterprise (or reCAPTCHA v3) attestation initialised alongside the Firebase app.
  • Enforcement enabled for Firestore, Cloud Storage, and Cloud Functions — after a monitoring
    period, so real traffic is not broken by a misconfiguration.
  • A debug-token path so local vite dev, vitest, and Playwright continue to work. Without
    this, App Check silently breaks every developer and every CI run.

Acceptance criteria

  • App Check initialised in src/firebase/
  • Local dev works via a debug token
  • npm --prefix lua-learning-website run test passes (emulators bypass App Check)
  • npm --prefix lua-learning-website run test:e2e passes
  • Enforcement enabled for Firestore, Storage, and Functions after a monitoring period
  • Debug-token setup documented in docs/cloud-storage.md
  • Production build verified on a Hosting preview channel before enforcement is switched on
  • Scoped mutation coverage >= 80%

Implementation notes

  • Turn enforcement on last, after the rest of the milestone is verified working. Enabling it
    early makes every other issue harder to debug, because failures look like permission errors.
  • The reCAPTCHA site key is another VITE_* env var (#787).
  • Emulators bypass App Check, so unit and rules tests are unaffected; E2E against a real project
    is where this bites.

Depends on

  • #787

Branching

This issue is part of the Cloud Accounts & Storage
milestone, which uses feat/cloud as its integration branch.

Branch from feat/cloud, and open the PR against feat/cloud. Never against main.

Create the branch (the --base flag also sets the default PR target for this branch):

gh issue develop <number> --base feat/cloud --checkout

Open the PR:

python3 scripts/issue-review.py <number> --base feat/cloud \
  --summary "<summary>" --test-plan "<test-plan>"

feat/cloud merges to main in a single PR once the milestone is complete.

Why both flags are required: gh issue develop without --base branches from the repository
default branch (main), and scripts/issue-review.py falls back to main when --base is
omitted — both for the gh pr create target and for the changed-file list in the PR body.

Ngôn ngữ chính
TypeScript
Star
1
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của jcollard/LuaInTheWeb

Tất cả issue của jcollard/LuaInTheWeb

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.