Commit fc47f7cd83

fc47f7cd83a608480bffd1727e1702860dbe61bd

parent: 75c8cbacbd

Unsigned

Darafei Praliaskouski <me@komzpa.net> · 2026-07-10 12:49 UTC
committer: <strk@kbt.io>

fix: clarify SSO login handoff

Layout: unified · split

README.md +2 −2
@@ -154,8 +154,8 @@ _(replace the placeholders in brackets [] with your own details)_:
154 /set matrix-rust.server.[server-name].username [username] 154 /set matrix-rust.server.[server-name].username [username]
155 /set matrix-rust.server.[server-name].password [password] 155 /set matrix-rust.server.[server-name].password [password]
156 156
157 To use single sign-on instead of password login, leave the password empty. 157 If the homeserver advertises single sign-on, leave the password empty to use
158 WeeChat will print a login URL when you connect. 158 it. WeeChat will print a login URL when you connect.
159 159
1603. Now try to connect. The first connection can take a few minutes while the 1603. Now try to connect. The first connection can take a few minutes while the
161 client syncs the account: 161 client syncs the account:
src/connection.rs +4 −3
@@ -423,14 +423,15 @@ impl Connection {
423 return; 423 return;
424 } 424 }
425 425
426 let sso_channel = channel.clone(); 426 let url_sender = channel.clone();
427 let mut builder = matrix_auth 427 let mut builder = matrix_auth
428 .login_sso(move |sso_url| { 428 .login_sso(move |sso_url| {
429 let sso_channel = sso_channel.clone();
430 async move { 429 async move {
431 let _ = sso_channel 430 let _ = url_sender
432 .send(Ok(ClientMessage::SsoLoginUrl(sso_url))) 431 .send(Ok(ClientMessage::SsoLoginUrl(sso_url)))
433 .await; 432 .await;
433 // Handing the URL to WeeChat successfully completes
434 // our callback; returning an error would abort SSO.
434 Ok(()) 435 Ok(())
435 } 436 }
436 }) 437 })