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.
20 lines • 874 B
TypeScript
/**
* A React hook that, on mount, will trigger an API request and create a new Nostr auth session.
* Thereafter, it'll attempt to open any installed Nostr extensions, or thrown 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 the pages router, it's not recommended for use in the app router.
*
* @returns {Object}
* @returns {Object}
* @returns {Boolean} isLoading - signifies if the session is loading or not
* @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 useNostrAuth(): {
isLoading: boolean;
error: string | null;
retry: (() => void) | null;
};
//# sourceMappingURL=useNostrAuth.d.ts.map