├── .gitignore ├── README.md ├── TODO.md ├── diagram.jpeg ├── examples ├── README.md ├── app-router │ ├── .env.example │ ├── .gitignore │ ├── README.md │ ├── app │ │ ├── api │ │ │ ├── auth │ │ │ │ └── [...nextauth] │ │ │ │ │ └── route.ts │ │ │ └── pubkey │ │ │ │ └── [...pubkey] │ │ │ │ └── route.ts │ │ ├── components │ │ │ └── SignIn.tsx │ │ ├── layout.tsx │ │ └── page.tsx │ ├── env.mjs │ ├── next.config.js │ ├── package-lock.json │ ├── package.json │ ├── tsconfig.json │ └── utils │ │ └── nextauth.ts ├── drizzle │ ├── .env.example │ ├── .gitignore │ ├── README.md │ ├── drizzle.config.ts │ ├── drizzle │ │ ├── 0000_neat_christian_walker.sql │ │ └── meta │ │ │ ├── 0000_snapshot.json │ │ │ └── _journal.json │ ├── env.mjs │ ├── next.config.js │ ├── package-lock.json │ ├── package.json │ ├── pages │ │ ├── _app.tsx │ │ ├── api │ │ │ ├── auth │ │ │ │ └── [...nextauth].ts │ │ │ └── pubkey │ │ │ │ └── [...pubkey].ts │ │ └── index.tsx │ ├── schema │ │ └── db │ │ │ ├── index.ts │ │ │ └── pubkey.ts │ ├── tsconfig.json │ └── utils │ │ └── db.ts ├── kv │ ├── .env.example │ ├── .gitignore │ ├── README.md │ ├── env.mjs │ ├── next.config.js │ ├── package-lock.json │ ├── package.json │ ├── pages │ │ ├── _app.tsx │ │ ├── api │ │ │ ├── auth │ │ │ │ └── [...nextauth].ts │ │ │ └── pubkey │ │ │ │ └── [...pubkey].ts │ │ └── index.tsx │ └── tsconfig.json ├── plain-js │ ├── .env.example │ ├── .gitignore │ ├── README.md │ ├── next.config.js │ ├── package-lock.json │ ├── package.json │ └── pages │ │ ├── _app.jsx │ │ ├── api │ │ ├── auth │ │ │ └── [...nextauth].js │ │ └── pubkey │ │ │ └── [...pubkey].js │ │ └── index.jsx ├── prisma │ ├── .gitignore │ ├── README.md │ ├── env.mjs │ ├── next.config.js │ ├── package-lock.json │ ├── package.json │ ├── pages │ │ ├── _app.tsx │ │ ├── api │ │ │ ├── auth │ │ │ │ └── [...nextauth].ts │ │ │ └── pubkey │ │ │ │ └── [...pubkey].ts │ │ └── index.tsx │ ├── prisma │ │ └── schema.prisma │ └── tsconfig.json ├── ui-app-router │ ├── .env.example │ ├── .gitignore │ ├── README.md │ ├── app │ │ ├── api │ │ │ ├── auth │ │ │ │ └── [...nextauth] │ │ │ │ │ └── route.ts │ │ │ └── pubkey │ │ │ │ └── [...pubkey] │ │ │ │ └── route.ts │ │ ├── components │ │ │ ├── LightningAuth.tsx │ │ │ ├── NostrAuth.tsx │ │ │ └── SignInButton.tsx │ │ ├── error │ │ │ └── page.tsx │ │ ├── layout.tsx │ │ ├── lightning-signin │ │ │ └── page.tsx │ │ ├── nostr-signin │ │ │ └── page.tsx │ │ └── page.tsx │ ├── env.mjs │ ├── next.config.js │ ├── package-lock.json │ ├── package.json │ ├── tsconfig.json │ └── utils │ │ └── nextauth.ts └── ui-pages-router │ ├── .env.example │ ├── .gitignore │ ├── README.md │ ├── env.mjs │ ├── next.config.js │ ├── package-lock.json │ ├── package.json │ ├── pages │ ├── _app.tsx │ ├── api │ │ ├── auth │ │ │ └── [...nextauth].ts │ │ └── pubkey │ │ │ └── [...pubkey].ts │ ├── error.tsx │ ├── index.tsx │ ├── lightning-signin-ssr.tsx │ ├── lightning-signin.tsx │ ├── nostr-signin-ssr.tsx │ └── nostr-signin.tsx │ └── tsconfig.json ├── jest.config.ts ├── package.json ├── src ├── generators │ ├── index.ts │ ├── qr.test.ts │ ├── qr.ts │ └── types.ts ├── hooks │ ├── constants.ts │ ├── index.ts │ ├── useLightningAuth.ts │ ├── useLightningPolling.ts │ ├── useNostrAuth.ts │ └── useNostrExtension.ts ├── index.ts ├── lnurl.d.ts ├── main │ ├── components │ │ ├── CopyCode.tsx │ │ ├── Details.tsx │ │ ├── Error.tsx │ │ ├── LightningAuth.tsx │ │ ├── LightningButton.tsx │ │ ├── Loading.tsx │ │ ├── NostrAuth.tsx │ │ ├── NostrButton.tsx │ │ ├── QrCode.tsx │ │ └── Title.tsx │ ├── config │ │ ├── default.test.ts │ │ ├── default.ts │ │ ├── hard.ts │ │ ├── index.ts │ │ └── types.ts │ ├── handlers │ │ ├── avatar.test.ts │ │ ├── avatar.ts │ │ ├── callback.test.ts │ │ ├── callback.ts │ │ ├── create.test.ts │ │ ├── create.ts │ │ ├── diagnostics.ts │ │ ├── lightning-signin.tsx │ │ ├── nostr-signin.tsx │ │ ├── poll.test.ts │ │ ├── poll.ts │ │ ├── qr.test.ts │ │ ├── qr.ts │ │ ├── token.test.ts │ │ └── token.ts │ ├── index.ts │ ├── utils │ │ ├── handlers.test.ts │ │ ├── handlers.ts │ │ ├── jwt.test.ts │ │ ├── jwt.ts │ │ ├── params.test.ts │ │ ├── params.ts │ │ ├── vanilla-lightning.ts │ │ └── vanilla-nostr.ts │ └── validation │ │ ├── api.test.ts │ │ ├── api.ts │ │ ├── config.test.ts │ │ └── config.ts ├── server │ ├── createLightningAuth.test.ts │ ├── createLightningAuth.ts │ ├── createNostrAuth.ts │ ├── index.ts │ └── types.ts └── utils │ ├── lnurl.test.ts │ └── lnurl.ts └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/.gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/README.md -------------------------------------------------------------------------------- /TODO.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/TODO.md -------------------------------------------------------------------------------- /diagram.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/diagram.jpeg -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/README.md -------------------------------------------------------------------------------- /examples/app-router/.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/app-router/.env.example -------------------------------------------------------------------------------- /examples/app-router/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/app-router/.gitignore -------------------------------------------------------------------------------- /examples/app-router/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/app-router/README.md -------------------------------------------------------------------------------- /examples/app-router/app/api/auth/[...nextauth]/route.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/app-router/app/api/auth/[...nextauth]/route.ts -------------------------------------------------------------------------------- /examples/app-router/app/api/pubkey/[...pubkey]/route.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/app-router/app/api/pubkey/[...pubkey]/route.ts -------------------------------------------------------------------------------- /examples/app-router/app/components/SignIn.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/app-router/app/components/SignIn.tsx -------------------------------------------------------------------------------- /examples/app-router/app/layout.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/app-router/app/layout.tsx -------------------------------------------------------------------------------- /examples/app-router/app/page.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/app-router/app/page.tsx -------------------------------------------------------------------------------- /examples/app-router/env.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/app-router/env.mjs -------------------------------------------------------------------------------- /examples/app-router/next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/app-router/next.config.js -------------------------------------------------------------------------------- /examples/app-router/package-lock.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/app-router/package-lock.json -------------------------------------------------------------------------------- /examples/app-router/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/app-router/package.json -------------------------------------------------------------------------------- /examples/app-router/tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/app-router/tsconfig.json -------------------------------------------------------------------------------- /examples/app-router/utils/nextauth.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/app-router/utils/nextauth.ts -------------------------------------------------------------------------------- /examples/drizzle/.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/drizzle/.env.example -------------------------------------------------------------------------------- /examples/drizzle/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/drizzle/.gitignore -------------------------------------------------------------------------------- /examples/drizzle/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/drizzle/README.md -------------------------------------------------------------------------------- /examples/drizzle/drizzle.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/drizzle/drizzle.config.ts -------------------------------------------------------------------------------- /examples/drizzle/drizzle/0000_neat_christian_walker.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/drizzle/drizzle/0000_neat_christian_walker.sql -------------------------------------------------------------------------------- /examples/drizzle/drizzle/meta/0000_snapshot.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/drizzle/drizzle/meta/0000_snapshot.json -------------------------------------------------------------------------------- /examples/drizzle/drizzle/meta/_journal.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/drizzle/drizzle/meta/_journal.json -------------------------------------------------------------------------------- /examples/drizzle/env.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/drizzle/env.mjs -------------------------------------------------------------------------------- /examples/drizzle/next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/drizzle/next.config.js -------------------------------------------------------------------------------- /examples/drizzle/package-lock.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/drizzle/package-lock.json -------------------------------------------------------------------------------- /examples/drizzle/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/drizzle/package.json -------------------------------------------------------------------------------- /examples/drizzle/pages/_app.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/drizzle/pages/_app.tsx -------------------------------------------------------------------------------- /examples/drizzle/pages/api/auth/[...nextauth].ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/drizzle/pages/api/auth/[...nextauth].ts -------------------------------------------------------------------------------- /examples/drizzle/pages/api/pubkey/[...pubkey].ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/drizzle/pages/api/pubkey/[...pubkey].ts -------------------------------------------------------------------------------- /examples/drizzle/pages/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/drizzle/pages/index.tsx -------------------------------------------------------------------------------- /examples/drizzle/schema/db/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./pubkey"; 2 | -------------------------------------------------------------------------------- /examples/drizzle/schema/db/pubkey.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/drizzle/schema/db/pubkey.ts -------------------------------------------------------------------------------- /examples/drizzle/tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/drizzle/tsconfig.json -------------------------------------------------------------------------------- /examples/drizzle/utils/db.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/drizzle/utils/db.ts -------------------------------------------------------------------------------- /examples/kv/.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/kv/.env.example -------------------------------------------------------------------------------- /examples/kv/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/kv/.gitignore -------------------------------------------------------------------------------- /examples/kv/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/kv/README.md -------------------------------------------------------------------------------- /examples/kv/env.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/kv/env.mjs -------------------------------------------------------------------------------- /examples/kv/next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/kv/next.config.js -------------------------------------------------------------------------------- /examples/kv/package-lock.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/kv/package-lock.json -------------------------------------------------------------------------------- /examples/kv/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/kv/package.json -------------------------------------------------------------------------------- /examples/kv/pages/_app.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/kv/pages/_app.tsx -------------------------------------------------------------------------------- /examples/kv/pages/api/auth/[...nextauth].ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/kv/pages/api/auth/[...nextauth].ts -------------------------------------------------------------------------------- /examples/kv/pages/api/pubkey/[...pubkey].ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/kv/pages/api/pubkey/[...pubkey].ts -------------------------------------------------------------------------------- /examples/kv/pages/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/kv/pages/index.tsx -------------------------------------------------------------------------------- /examples/kv/tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/kv/tsconfig.json -------------------------------------------------------------------------------- /examples/plain-js/.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/plain-js/.env.example -------------------------------------------------------------------------------- /examples/plain-js/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/plain-js/.gitignore -------------------------------------------------------------------------------- /examples/plain-js/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/plain-js/README.md -------------------------------------------------------------------------------- /examples/plain-js/next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/plain-js/next.config.js -------------------------------------------------------------------------------- /examples/plain-js/package-lock.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/plain-js/package-lock.json -------------------------------------------------------------------------------- /examples/plain-js/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/plain-js/package.json -------------------------------------------------------------------------------- /examples/plain-js/pages/_app.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/plain-js/pages/_app.jsx -------------------------------------------------------------------------------- /examples/plain-js/pages/api/auth/[...nextauth].js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/plain-js/pages/api/auth/[...nextauth].js -------------------------------------------------------------------------------- /examples/plain-js/pages/api/pubkey/[...pubkey].js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/plain-js/pages/api/pubkey/[...pubkey].js -------------------------------------------------------------------------------- /examples/plain-js/pages/index.jsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/plain-js/pages/index.jsx -------------------------------------------------------------------------------- /examples/prisma/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/prisma/.gitignore -------------------------------------------------------------------------------- /examples/prisma/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/prisma/README.md -------------------------------------------------------------------------------- /examples/prisma/env.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/prisma/env.mjs -------------------------------------------------------------------------------- /examples/prisma/next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/prisma/next.config.js -------------------------------------------------------------------------------- /examples/prisma/package-lock.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/prisma/package-lock.json -------------------------------------------------------------------------------- /examples/prisma/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/prisma/package.json -------------------------------------------------------------------------------- /examples/prisma/pages/_app.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/prisma/pages/_app.tsx -------------------------------------------------------------------------------- /examples/prisma/pages/api/auth/[...nextauth].ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/prisma/pages/api/auth/[...nextauth].ts -------------------------------------------------------------------------------- /examples/prisma/pages/api/pubkey/[...pubkey].ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/prisma/pages/api/pubkey/[...pubkey].ts -------------------------------------------------------------------------------- /examples/prisma/pages/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/prisma/pages/index.tsx -------------------------------------------------------------------------------- /examples/prisma/prisma/schema.prisma: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/prisma/prisma/schema.prisma -------------------------------------------------------------------------------- /examples/prisma/tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/prisma/tsconfig.json -------------------------------------------------------------------------------- /examples/ui-app-router/.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-app-router/.env.example -------------------------------------------------------------------------------- /examples/ui-app-router/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-app-router/.gitignore -------------------------------------------------------------------------------- /examples/ui-app-router/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-app-router/README.md -------------------------------------------------------------------------------- /examples/ui-app-router/app/api/auth/[...nextauth]/route.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-app-router/app/api/auth/[...nextauth]/route.ts -------------------------------------------------------------------------------- /examples/ui-app-router/app/api/pubkey/[...pubkey]/route.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-app-router/app/api/pubkey/[...pubkey]/route.ts -------------------------------------------------------------------------------- /examples/ui-app-router/app/components/LightningAuth.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-app-router/app/components/LightningAuth.tsx -------------------------------------------------------------------------------- /examples/ui-app-router/app/components/NostrAuth.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-app-router/app/components/NostrAuth.tsx -------------------------------------------------------------------------------- /examples/ui-app-router/app/components/SignInButton.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-app-router/app/components/SignInButton.tsx -------------------------------------------------------------------------------- /examples/ui-app-router/app/error/page.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-app-router/app/error/page.tsx -------------------------------------------------------------------------------- /examples/ui-app-router/app/layout.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-app-router/app/layout.tsx -------------------------------------------------------------------------------- /examples/ui-app-router/app/lightning-signin/page.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-app-router/app/lightning-signin/page.tsx -------------------------------------------------------------------------------- /examples/ui-app-router/app/nostr-signin/page.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-app-router/app/nostr-signin/page.tsx -------------------------------------------------------------------------------- /examples/ui-app-router/app/page.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-app-router/app/page.tsx -------------------------------------------------------------------------------- /examples/ui-app-router/env.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-app-router/env.mjs -------------------------------------------------------------------------------- /examples/ui-app-router/next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-app-router/next.config.js -------------------------------------------------------------------------------- /examples/ui-app-router/package-lock.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-app-router/package-lock.json -------------------------------------------------------------------------------- /examples/ui-app-router/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-app-router/package.json -------------------------------------------------------------------------------- /examples/ui-app-router/tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-app-router/tsconfig.json -------------------------------------------------------------------------------- /examples/ui-app-router/utils/nextauth.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-app-router/utils/nextauth.ts -------------------------------------------------------------------------------- /examples/ui-pages-router/.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-pages-router/.env.example -------------------------------------------------------------------------------- /examples/ui-pages-router/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-pages-router/.gitignore -------------------------------------------------------------------------------- /examples/ui-pages-router/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-pages-router/README.md -------------------------------------------------------------------------------- /examples/ui-pages-router/env.mjs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-pages-router/env.mjs -------------------------------------------------------------------------------- /examples/ui-pages-router/next.config.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-pages-router/next.config.js -------------------------------------------------------------------------------- /examples/ui-pages-router/package-lock.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-pages-router/package-lock.json -------------------------------------------------------------------------------- /examples/ui-pages-router/package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-pages-router/package.json -------------------------------------------------------------------------------- /examples/ui-pages-router/pages/_app.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-pages-router/pages/_app.tsx -------------------------------------------------------------------------------- /examples/ui-pages-router/pages/api/auth/[...nextauth].ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-pages-router/pages/api/auth/[...nextauth].ts -------------------------------------------------------------------------------- /examples/ui-pages-router/pages/api/pubkey/[...pubkey].ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-pages-router/pages/api/pubkey/[...pubkey].ts -------------------------------------------------------------------------------- /examples/ui-pages-router/pages/error.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-pages-router/pages/error.tsx -------------------------------------------------------------------------------- /examples/ui-pages-router/pages/index.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-pages-router/pages/index.tsx -------------------------------------------------------------------------------- /examples/ui-pages-router/pages/lightning-signin-ssr.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-pages-router/pages/lightning-signin-ssr.tsx -------------------------------------------------------------------------------- /examples/ui-pages-router/pages/lightning-signin.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-pages-router/pages/lightning-signin.tsx -------------------------------------------------------------------------------- /examples/ui-pages-router/pages/nostr-signin-ssr.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-pages-router/pages/nostr-signin-ssr.tsx -------------------------------------------------------------------------------- /examples/ui-pages-router/pages/nostr-signin.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-pages-router/pages/nostr-signin.tsx -------------------------------------------------------------------------------- /examples/ui-pages-router/tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/examples/ui-pages-router/tsconfig.json -------------------------------------------------------------------------------- /jest.config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/jest.config.ts -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/package.json -------------------------------------------------------------------------------- /src/generators/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/generators/index.ts -------------------------------------------------------------------------------- /src/generators/qr.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/generators/qr.test.ts -------------------------------------------------------------------------------- /src/generators/qr.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/generators/qr.ts -------------------------------------------------------------------------------- /src/generators/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/generators/types.ts -------------------------------------------------------------------------------- /src/hooks/constants.ts: -------------------------------------------------------------------------------- 1 | export const maxNetworkRequestsFailures = 3; 2 | -------------------------------------------------------------------------------- /src/hooks/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/hooks/index.ts -------------------------------------------------------------------------------- /src/hooks/useLightningAuth.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/hooks/useLightningAuth.ts -------------------------------------------------------------------------------- /src/hooks/useLightningPolling.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/hooks/useLightningPolling.ts -------------------------------------------------------------------------------- /src/hooks/useNostrAuth.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/hooks/useNostrAuth.ts -------------------------------------------------------------------------------- /src/hooks/useNostrExtension.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/hooks/useNostrExtension.ts -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/index.ts -------------------------------------------------------------------------------- /src/lnurl.d.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/lnurl.d.ts -------------------------------------------------------------------------------- /src/main/components/CopyCode.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/components/CopyCode.tsx -------------------------------------------------------------------------------- /src/main/components/Details.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/components/Details.tsx -------------------------------------------------------------------------------- /src/main/components/Error.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/components/Error.tsx -------------------------------------------------------------------------------- /src/main/components/LightningAuth.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/components/LightningAuth.tsx -------------------------------------------------------------------------------- /src/main/components/LightningButton.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/components/LightningButton.tsx -------------------------------------------------------------------------------- /src/main/components/Loading.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/components/Loading.tsx -------------------------------------------------------------------------------- /src/main/components/NostrAuth.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/components/NostrAuth.tsx -------------------------------------------------------------------------------- /src/main/components/NostrButton.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/components/NostrButton.tsx -------------------------------------------------------------------------------- /src/main/components/QrCode.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/components/QrCode.tsx -------------------------------------------------------------------------------- /src/main/components/Title.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/components/Title.tsx -------------------------------------------------------------------------------- /src/main/config/default.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/config/default.test.ts -------------------------------------------------------------------------------- /src/main/config/default.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/config/default.ts -------------------------------------------------------------------------------- /src/main/config/hard.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/config/hard.ts -------------------------------------------------------------------------------- /src/main/config/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/config/index.ts -------------------------------------------------------------------------------- /src/main/config/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/config/types.ts -------------------------------------------------------------------------------- /src/main/handlers/avatar.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/handlers/avatar.test.ts -------------------------------------------------------------------------------- /src/main/handlers/avatar.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/handlers/avatar.ts -------------------------------------------------------------------------------- /src/main/handlers/callback.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/handlers/callback.test.ts -------------------------------------------------------------------------------- /src/main/handlers/callback.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/handlers/callback.ts -------------------------------------------------------------------------------- /src/main/handlers/create.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/handlers/create.test.ts -------------------------------------------------------------------------------- /src/main/handlers/create.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/handlers/create.ts -------------------------------------------------------------------------------- /src/main/handlers/diagnostics.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/handlers/diagnostics.ts -------------------------------------------------------------------------------- /src/main/handlers/lightning-signin.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/handlers/lightning-signin.tsx -------------------------------------------------------------------------------- /src/main/handlers/nostr-signin.tsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/handlers/nostr-signin.tsx -------------------------------------------------------------------------------- /src/main/handlers/poll.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/handlers/poll.test.ts -------------------------------------------------------------------------------- /src/main/handlers/poll.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/handlers/poll.ts -------------------------------------------------------------------------------- /src/main/handlers/qr.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/handlers/qr.test.ts -------------------------------------------------------------------------------- /src/main/handlers/qr.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/handlers/qr.ts -------------------------------------------------------------------------------- /src/main/handlers/token.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/handlers/token.test.ts -------------------------------------------------------------------------------- /src/main/handlers/token.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/handlers/token.ts -------------------------------------------------------------------------------- /src/main/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/index.ts -------------------------------------------------------------------------------- /src/main/utils/handlers.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/utils/handlers.test.ts -------------------------------------------------------------------------------- /src/main/utils/handlers.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/utils/handlers.ts -------------------------------------------------------------------------------- /src/main/utils/jwt.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/utils/jwt.test.ts -------------------------------------------------------------------------------- /src/main/utils/jwt.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/utils/jwt.ts -------------------------------------------------------------------------------- /src/main/utils/params.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/utils/params.test.ts -------------------------------------------------------------------------------- /src/main/utils/params.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/utils/params.ts -------------------------------------------------------------------------------- /src/main/utils/vanilla-lightning.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/utils/vanilla-lightning.ts -------------------------------------------------------------------------------- /src/main/utils/vanilla-nostr.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/utils/vanilla-nostr.ts -------------------------------------------------------------------------------- /src/main/validation/api.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/validation/api.test.ts -------------------------------------------------------------------------------- /src/main/validation/api.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/validation/api.ts -------------------------------------------------------------------------------- /src/main/validation/config.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/validation/config.test.ts -------------------------------------------------------------------------------- /src/main/validation/config.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/main/validation/config.ts -------------------------------------------------------------------------------- /src/server/createLightningAuth.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/server/createLightningAuth.test.ts -------------------------------------------------------------------------------- /src/server/createLightningAuth.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/server/createLightningAuth.ts -------------------------------------------------------------------------------- /src/server/createNostrAuth.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/server/createNostrAuth.ts -------------------------------------------------------------------------------- /src/server/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/server/index.ts -------------------------------------------------------------------------------- /src/server/types.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/server/types.ts -------------------------------------------------------------------------------- /src/utils/lnurl.test.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/utils/lnurl.test.ts -------------------------------------------------------------------------------- /src/utils/lnurl.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/src/utils/lnurl.ts -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jowo-io/next-auth-pubkey/HEAD/tsconfig.json --------------------------------------------------------------------------------