mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-08 13:52:58 +00:00
refactor(auth): unify login logic in NostrClient and enhance security
- Refactor `loginWithExtension` into `NostrClient` to centralize NIP-07 logic. - Add `validator` support to `NostrClient` login methods to enforce access control (whitelists/blacklists) before setting the active signer. - Update `nip07`, `nip46`, and `nsec` auth providers to inject `accessControl` checks via validators. - Fix imports in auth providers to ensure `accessControl` is available. - Remove unused `accessControl` import from `js/nostr/client.js` to avoid potential circular dependencies. - Verified with targeted unit tests and a custom integration script (`test-nip07-refactor.mjs`). Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
1 parent
e76e84a524
commit
b6403c9120
1 file changed
-1
@@ -19,7 +19,6 @@
|
||||
|
||||
import { isDevMode } from "../config.js";
|
||||
import { FEATURE_PUBLISH_NIP71 } from "../constants.js";
|
||||
import { accessControl } from "../accessControl.js";
|
||||
import { bytesToHex, sha256 } from "../../vendor/crypto-helpers.bundle.min.js";
|
||||
import { infoHashFromMagnet } from "../magnets.js";
|
||||
// 🔧 merged conflicting changes from codex/update-video-publishing-and-parsing-logic vs unstable
|
||||
|
||||
Reference in new issue
Block a user