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.

19 lines 848 B
import { NextAuthNostrClientSession } from "../server/index.js"; /** * A React hook that, on mount, will trigger any installed Nostr extensions or return an error. * Once a success Nostr extension event is received from the extension the user will be * redirected to the `next-auth` redirect url. * * This hook is designed for use in both the pages router and the app router. * * @param {object} session - a session object generated by invoking the `createNostrAuth` method * * @returns {Object} * @returns {String} error - an error message or an empty string * @returns {Function} retry - a function used to retry opening the nostr extension */ export declare function useNostrExtension(session: NextAuthNostrClientSession): { error: string | null; retry: (() => void) | null; }; //# sourceMappingURL=useNostrExtension.d.ts.map