Support npub format in ADMINS environment variable for admin authentication #3

Closed
opened 2026-04-11 09:50:52 +00:00 by userAdityaa · 2 comments
Contributor

Description

Currently, the backend only recognizes hex-encoded public keys in the ADMINS environment variable for admin authentication. However, many users copy and paste their Nostr public keys in the more common npub... bech32 format. If an npub is used, admin access silently fails, which can be confusing and hard to debug

Benefits:

  • Improves developer/user experience by supporting the most common Nostr key formats.
  • Reduces silent misconfiguration and support burden.
  • Aligns with user expectations from Nostr tooling.
### Description Currently, the backend only recognizes hex-encoded public keys in the **ADMINS** environment variable for admin authentication. However, many users copy and paste their Nostr public keys in the more common npub... bech32 format. If an **npub** is used, admin access silently fails, which can be confusing and hard to debug ### Benefits: * Improves developer/user experience by supporting the most common Nostr key formats. * Reduces silent misconfiguration and support burden. * Aligns with user expectations from Nostr tooling.
Owner

In user-facing applications this pattern is applicable, but not in highly technical contexts.

In user-facing applications this pattern is applicable, but not in highly technical contexts.
Author
Contributor

Yes, thought of not raising an issue, but still did to know your thoughts on it.

Yes, thought of not raising an issue, but still did to know your thoughts on it.
Sign in to join this conversation.
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: coracle/caravel#3