Registry / security / next-auth-lightning-provider

next-auth-lightning-provider

JSON →
library1.0.0-beta.4jsnpmunverified

This package was renamed to next-auth-pubkey. It provides a lightweight, self-hosted Lightning and Nostr authentication provider for Next.js apps. It integrates with next-auth v4 and supports Next.js 12/13/14. The project ships TypeScript types and follows a beta release cadence. Unlike cloud-based auth providers, it keeps auth data entirely self-hosted, leveraging the Lightning Network and Nostr protocol for decentralized identity.

npm install next-auth-lightning-provider
INSTALL
IMPORT
SIG · NEXT-AUTH-LIGHTNIN
N
next-auth-lightning-provider
securityjavascriptv1.0.0-beta.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import nextAuthLightningProvider from 'next-auth-pubkey'
import { nextAuthLightningProvider } from 'next-auth-pubkey'
This package is renamed; now use 'next-auth-pubkey' package
LightningProvider
import { LightningProvider } from 'next-auth-pubkey'
const LightningProvider = require('next-auth-pubkey').LightningProvider
If using CommonJS, use destructuring. Named export available.
NostrProvider
import { NostrProvider } from 'next-auth-pubkey'
import NostrProvider from 'next-auth-pubkey'
NostrProvider is a named export, not default.

Shows how to configure Lightning and Nostr providers with NextAuth using named imports.

import NextAuth from 'next-auth'; import { LightningProvider, NostrProvider } from 'next-auth-pubkey'; export default NextAuth({ providers: [ LightningProvider({ clientId: process.env.LIGHTNING_CLIENT_ID ?? '', clientSecret: process.env.LIGHTNING_CLIENT_SECRET ?? '', }), NostrProvider({ relay: process.env.NOSTR_RELAY ?? 'wss://relay.example.com', }), ], });
Debug
Known issues
breakingPackage renamed from 'next-auth-lightning-provider' to 'next-auth-pubkey'
fix
Install 'next-auth-pubkey' instead. Update imports accordingly.
affects: 1.0.0-beta.4
deprecatedAll versions under 'next-auth-lightning-provider' are deprecated
fix
Migrate to 'next-auth-pubkey'.
affects: >=1.0.0-beta.1
gotchaThe package is in beta and does not follow semver strictly; breaking changes may occur in minor releases
fix
Pin to exact version in package.json and test upgrades.
affects: *
gotchaNode.js >=14 required; no ESM-only export yet
fix
Ensure Node version meets requirement.
affects: *
Errors
Common errors & fixes
Cannot find module 'next-auth-lightning-provider'
Package has been renamed to 'next-auth-pubkey'
fix
npm uninstall next-auth-lightning-provider && npm install next-auth-pubkey
Module not found: Can't resolve 'next-auth-pubkey'
Package not installed or typo in import
fix
Ensure 'next-auth-pubkey' is in package.json and run npm install. Check import path.
TypeError: (0 , provider) is not a function
Incorrect import style (e.g., destructured default import)
fix
Use import NextAuthLightningProvider from 'next-auth-pubkey' (default) or import { LightningProvider } from 'next-auth-pubkey' (named).
Upgrade
Version history
1.0.0-beta.4latest on npm
Audit
Dependencies
nextrequiredPeer dependency: required as framework for route handlers and pages
next-authrequiredPeer dependency: the authentication framework this provider integrates with
reactrequiredPeer dependency: required for UI components
react-domrequiredPeer dependency: required for rendering
Agent activity
22 hits · last 30 days
node
20
OpenAI (training)
1
Resources
next-auth-lightning-provider — npm install next-auth-lightning-provider · libregistry