From d820c56e8b971254dfcbde58c8923c7282b1bf4f Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Thu, 18 Feb 2021 18:35:53 +0200 Subject: [PATCH] Only use SSO if no password is entered --- matrix/matrix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix/matrix.go b/matrix/matrix.go index 69ba8f0..3056ead 100644 --- a/matrix/matrix.go +++ b/matrix/matrix.go @@ -254,7 +254,7 @@ func (c *Container) Login(user, password string) error { for _, flow := range resp.Flows { if flow.Type == "m.login.password" { return c.PasswordLogin(user, password) - } else if flow.Type == "m.login.sso" { + } else if flow.Type == "m.login.sso" && len(password) == 0 { return c.SingleSignOn() } }