From 8dbbe74b2bf9714370197816928c93fe3a34cbd4 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 21 Sep 2026 12:16:17 -0700 Subject: Seed words read down each column; the Google central is a parameter with a door to the previous one. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Word grids flow down a column then the next, with the row count from the word count — on a phone the first column is 1–6, the way a hand copies a list. pomegranate.js takes the central as an option (CENTRALS.coinos is auth.coinos.io, now deployed; the default stays auth.njump.me until its Google client is live), and the sign-in card grows a "previous server" line once the default moves, so accounts made under njump keep working. Co-Authored-By: Claude Fable 5.1 Claude-Session: https://claude.ai/code/session_01Tmfg8k5f3TbNJS34qiqHAp --- src/pomegranate.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/pomegranate.js') diff --git a/src/pomegranate.js b/src/pomegranate.js index 59a1d3b..e86b650 100644 --- a/src/pomegranate.js +++ b/src/pomegranate.js @@ -19,7 +19,13 @@ import { hex } from '@scure/base'; import { finalizeEvent, generateSecretKey } from 'nostr-tools/pure'; import { hexPubShard, hexShard, trustedKeyDeal } from '@jsr/fiatjaf__promenade-trusted-dealer'; -export const CENTRAL = 'https://auth.njump.me'; +// Which central: coinos runs its own (auth.coinos.io — the Google consent +// screen and the bunker relay carry our name), but accounts live PER +// central, so anyone who signed in while auth.njump.me was the default +// keeps a door to it (see nostrlogin's "previous server" line). +export const CENTRALS = { coinos: 'https://auth.coinos.io', legacy: 'https://auth.njump.me' }; +export const DEFAULT_CENTRAL = CENTRALS.legacy; // flip to CENTRALS.coinos once its Google client is live +let CENTRAL = DEFAULT_CENTRAL; const OPERATORS = [ 'https://po.f7z.io', 'https://po.coracle.social', @@ -147,8 +153,10 @@ async function bunkerUri(token) { } // The whole flow: authenticate, find-or-create the sharded account, hand back -// a bunker URI. `popup` must come from the caller's click handler. -export async function loginWithGoogle(popup, { onStatus } = {}) { +// a bunker URI. `popup` must come from the caller's click handler; `central` +// picks the server (default: DEFAULT_CENTRAL). +export async function loginWithGoogle(popup, { onStatus, central } = {}) { + CENTRAL = central || DEFAULT_CENTRAL; const token = await authenticate(popup); const email = emailOf(token); if (!email) throw new Error('Google login returned no email'); -- cgit v1.2.3