diff options
author | Erik Johnston <erik@matrix.org> | 2021-04-23 15:46:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-23 15:46:29 +0100 |
commit | a15c003e5b0bff8bf78a675f3b719d3f25fe8bde (patch) | |
tree | 70b5d0d2e6745d84ad2b2d62963eaf49e65b1404 /synapse/handlers/oidc.py | |
parent | Remove room and user invite ratelimits in default unit test config (#9871) (diff) | |
download | synapse-a15c003e5b0bff8bf78a675f3b719d3f25fe8bde.tar.xz |
Make DomainSpecificString an attrs class (#9875)
Diffstat (limited to 'synapse/handlers/oidc.py')
-rw-r--r-- | synapse/handlers/oidc.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/handlers/oidc.py b/synapse/handlers/oidc.py index 45514be50f..1c4a43be0a 100644 --- a/synapse/handlers/oidc.py +++ b/synapse/handlers/oidc.py @@ -957,6 +957,11 @@ class OidcProvider: # and attempt to match it. attributes = await oidc_response_to_user_attributes(failures=0) + if attributes.localpart is None: + # If no localpart is returned then we will generate one, so + # there is no need to search for existing users. + return None + user_id = UserID(attributes.localpart, self._server_name).to_string() users = await self._store.get_users_by_id_case_insensitive(user_id) if users: |