* wip * simplify nostr connect uri logic * improve wait for connection * improve handle password * . * add countdown
15 lines
378 B
Rust
15 lines
378 B
Rust
use nostr_connect::prelude::*;
|
|
|
|
#[derive(Debug, Clone)]
|
|
pub struct CoopAuthUrlHandler;
|
|
|
|
impl AuthUrlHandler for CoopAuthUrlHandler {
|
|
fn on_auth_url(&self, auth_url: Url) -> BoxedFuture<Result<()>> {
|
|
Box::pin(async move {
|
|
log::info!("Received Auth URL: {auth_url}");
|
|
webbrowser::open(auth_url.as_str())?;
|
|
Ok(())
|
|
})
|
|
}
|
|
}
|