UNPKG

next-auth-pubkey

Version:

A light-weight Lightning and Nostr auth provider for your Next.js app that's entirely self-hosted and plugs seamlessly into the next-auth framework.

10 lines (9 loc) 301 B
import { hardConfig } from "../../main/config/hard.js"; export function formatLightningAuth(lnurl) { if (!lnurl) { return { lnurl: "", qr: "", button: "" }; } const qr = `${hardConfig.apis.qr}/${lnurl}`; const button = `lightning:${lnurl}`; return { lnurl, qr, button }; }