feat(backend): support npub and nsec formats in ADMINS env for admin auth #4

Closed
userAdityaa wants to merge 1 commits from userAdityaa/caravel:admin-npub-support into master
Contributor

Summary

This PR enhances admin authentication by allowing the ADMINS environment variable to accept both hex and npub (bech32) public key formats, as well as nsec (private key, deriving the pubkey). Previously, only hex keys were supported, which could lead to silent admin access failures if an npub was used.

Changes

  • Normalize all ADMINS entries to hex, supporting hex, npub, and nsec formats.
  • Update .env.template and backend documentation to clarify accepted formats.
  • No breaking changes for existing hex-based setups.

Closes #3

### Summary This PR enhances admin authentication by allowing the **ADMINS** environment variable to accept both hex and npub (bech32) public key formats, as well as nsec (private key, deriving the pubkey). Previously, only hex keys were supported, which could lead to silent admin access failures if an **npub** was used. ### Changes * Normalize all ADMINS entries to hex, supporting hex, npub, and nsec formats. * Update `.env.template` and backend documentation to clarify accepted formats. * No breaking changes for existing hex-based setups. Closes #3
userAdityaa added 1 commit 2026-04-11 09:54:11 +00:00
Owner

Let's not do this, postell's law doesn't apply here. If someone is going to run caravel, they are competent to use hex pubkeys.

Let's not do this, postell's law doesn't apply here. If someone is going to run caravel, they are competent to use hex pubkeys.
hodlbod closed this pull request 2026-04-13 16:58:11 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: coracle/caravel#4