From c92e252adc9990fa4d147bad0a8bccafc19dfbb8 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Wed, 27 Nov 2024 07:41:25 +0000 Subject: feat(export-keys): to use in other clients as part of the easy on-boaridng flow --- src/lib/login/existing.rs | 2 +- src/lib/login/fresh.rs | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/lib') diff --git a/src/lib/login/existing.rs b/src/lib/login/existing.rs index 872e459..f5b93c7 100644 --- a/src/lib/login/existing.rs +++ b/src/lib/login/existing.rs @@ -60,7 +60,7 @@ pub async fn load_existing_login( } /// priority order: cli arguments, local git config, global git config -fn get_signer_info( +pub fn get_signer_info( git_repo: &Option<&Repo>, signer_info: &Option, password: &Option, diff --git a/src/lib/login/fresh.rs b/src/lib/login/fresh.rs index b874992..95c86a4 100644 --- a/src/lib/login/fresh.rs +++ b/src/lib/login/fresh.rs @@ -447,7 +447,7 @@ pub async fn listen_for_remote_signer( } } -fn generate_qr(data: &str) -> Result> { +pub fn generate_qr(data: &str) -> Result> { let mut lines = vec![]; let qr = QrCode::new(data.as_bytes()).context("failed to create QR of nostrconnect login url")?; @@ -695,7 +695,7 @@ async fn signup( ) .context("failed to get display name input from interactor")?; if name.is_empty() { - show_prompt_error("emtpy display name", ""); + show_prompt_error("empty display name", ""); match Interactor::default().choice( PromptChoiceParms::default() .with_default(0) @@ -740,7 +740,9 @@ async fn signup( ) .await?; } - eprintln!("TODO: advice about using in other clients"); + eprintln!( + "to login to other nostr clients eg. gitworkshop.dev with this account run `ngit export-keys` at any time to reveal your nostr account secret" + ); break Ok(Some(( Arc::new(keys), public_key, -- cgit v1.2.3