mirror of
https://github.com/bitbaum/accountkit.git
synced 2026-12-04 05:57:23 +01:00
* feat(auth): Lightning login (LNURL-auth, LUD-04), opt-in per deployment A free, Bitcoin-native way in: the person's own Lightning wallet signs a one-time challenge shown as a QR code (or opened through a lightning: link on the same device). No key, no third party, nothing paid. The signed key is a sign-in method (providerId "lightning"), never an email. - /lightning/start mints a challenge (five minutes, used once) and binds it to the asking browser with a signed cookie; /lightning/callback is the wallet's LUD-04 call and checks the DER secp256k1 signature of k1; /sign-in/lightning (polled) signs in or creates the person; /lightning/link adds a wallet to the signed-in person, never one that already signs in to someone else. - A second factor applies; minting and the wallet's call spend the credential bucket. - SignInForm and SignUpForm offer "Sign in with a Lightning wallet", AccountPanel "Add Lightning wallet"; words in all six languages. - Off until ACCOUNTKIT_LIGHTNING=1. Tests: LUD-01's own LNURL both ways, a signature made by OpenSSL, and the whole flow on a real database (PGlite) with a wallet that signs as LUD-04 says: sign-in and sign-in again, a forged signature, an onlooker without the browser's cookie, a second factor, linking and a taken wallet, and nothing mounted without the opt-in. Browser: QR, wallet link, 44px, no sideways scroll at 320 and 390px. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9 * feat(screens): a product's own GitHub app on the shared screens Loki keeps its GitHub sign-in (its own app, githubSignIn: true). The shared screens drew only the shared sign-in and OrangeCat, so Loki could not move onto SignInForm without losing it. signInMethods takes githubSignIn and reports methods.github; SignInForm, SignUpForm and AccountPanel draw it beside OrangeCat. The variables alone still offer nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9 --------- Co-authored-by: Claude <noreply@anthropic.com>
1 line
2.3 KiB
Plaintext
1 line
2.3 KiB
Plaintext
{"version":3,"file":"methods.d.ts","sourceRoot":"","sources":["../../src/auth/methods.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,K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