vetkeys: remove #120 IdbStorage/LocalStorage workaround once icp-js-auth#137 is released
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 70/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- rust, typescript
- Lĩnh vực
- authentication, frontend
Hướng nghiên cứu
Sau khi dfinity/icp-js-auth#137 được phát hành, sử dụng 11 điểm vào vetkeys bị ảnh hưởng được liệt kê và grep để tìm workaround của #120. Nâng cấp @icp-sdk/auth, xóa override LocalStorage/Ed25519 và import không được sử dụng, sau đó xác minh rằng việc đăng nhập trên localhost, tải lại liên tục và các chu kỳ đăng nhập-đăng xuất không còn tạo ra InvalidStateError.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Background
The vetkeys examples currently carry a localhost-only workaround for dfinity/icp-js-auth#120: on localhost they swap the default secure IdbStorage + ECDSA key for LocalStorage + Ed25519, because the default IdbStorage threw InvalidStateError: ... The database connection is closing on Vite dev servers.
The upstream fix is dfinity/icp-js-auth#137 (recovers from force-closed IndexedDB connections + memoizes the storage connection + awaits session hydration before signIn/signOut writes). It has been verified to resolve #120 (bug reproduces on @icp-sdk/[email protected], gone on the PR branch).
Task
Once #137 is merged and released, in each affected example:
- Bump
@icp-sdk/authto the release that contains the fix. - Remove the
#120workaround — drop theisLocalEnv ? { storage: new LocalStorage(), keyType: "Ed25519" } : {}override (and the now-unusedLocalStorageimport) so localhost uses the default secureIdbStorage+ ECDSA, same as production.
Affected examples (11)
Files containing the workaround (grep -rl "icp-js-auth/issues/120"):
motoko/vetkeys/basic_bls_signing/frontend/src/main.tsmotoko/vetkeys/basic_ibe/frontend/src/main.tsmotoko/vetkeys/encrypted_notes_app_vetkd/frontend/src/store/auth.tsmotoko/vetkeys/password_manager/frontend/src/store/auth.tsmotoko/vetkeys/password_manager_with_metadata/frontend/src/store/auth.tsrust/vetkeys/basic_bls_signing/frontend/src/main.tsrust/vetkeys/basic_ibe/frontend/src/main.tsrust/vetkeys/basic_timelock_ibe/frontend/src/main.tsrust/vetkeys/encrypted_notes_app_vetkd/frontend/src/store/auth.tsrust/vetkeys/password_manager/frontend/src/store/auth.tsrust/vetkeys/password_manager_with_metadata/frontend/src/store/auth.ts
(basic_vetkd motoko + rust don't carry the workaround.)
Verify after removal
Log in on a localhost dev server, then exercise reload churn / login-logout cycles — the InvalidStateError must no longer appear, confirming the default IdbStorage path is safe again.
Blocked on dfinity/icp-js-auth#137.
- Ngôn ngữ chính
- Rust
- Star
- 613
- Fork
- 433
- Merge trung bình
- 19 giờ 43 phút
- Pull request đã merge (30 ngày)
- 4
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của dfinity/examples
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
Tất cả issue của dfinity/examples
Issue tương tự
-
ci: SHA pin 3rd party actionsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Nushell launcher failure.Đang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Zellij doesn't validate hex colors correctly and crashesCó thể đã có người làm @ymcx đã nhận hôm nay. Đang mởsuspected bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
zellij-org/zellij#5732 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug(api): E_DOSE_ATTR_NONFINITE for a modeled D/R still says the value "never reaches you as a NaN"Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100