Only use SSO if no password is entered
This commit is contained in:
parent
3a2a11b2b0
commit
d820c56e8b
@ -254,7 +254,7 @@ func (c *Container) Login(user, password string) error {
|
|||||||
for _, flow := range resp.Flows {
|
for _, flow := range resp.Flows {
|
||||||
if flow.Type == "m.login.password" {
|
if flow.Type == "m.login.password" {
|
||||||
return c.PasswordLogin(user, 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()
|
return c.SingleSignOn()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user