This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,9 +131,14 @@ def __init__(self, hs):
131131 for t in provider .get_supported_login_types ().keys ():
132132 if t not in login_types :
133133 login_types .append (t )
134- if self ._saml2_enabled :
135- login_types .append (LoginType .SSO )
136134 self ._supported_login_types = login_types
135+ # Login types and UI Auth types have a heavy overlap, but are not
136+ # necessarily identical. Login types have SSO (and other login types)
137+ # added in the rest layer, see synapse.rest.client.v1.login.LoginRestServerlet.on_GET.
138+ ui_auth_types = login_types .copy ()
139+ if self ._saml2_enabled :
140+ ui_auth_types .append (LoginType .SSO )
141+ self ._supported_ui_auth_types = ui_auth_types
137142
138143 # Ratelimiter for failed auth during UIA. Uses same ratelimit config
139144 # as per `rc_login.failed_attempts`.
@@ -214,7 +219,7 @@ def validate_user_via_ui_auth(
214219 )
215220
216221 # build a list of supported flows
217- flows = [[login_type ] for login_type in self ._supported_login_types ]
222+ flows = [[login_type ] for login_type in self ._supported_ui_auth_types ]
218223
219224 try :
220225 result , params , _ = yield self .check_auth (
You can’t perform that action at this time.
0 commit comments