summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorTdxdxoz <tdxdxoz@gmail.com>2020-09-25 19:01:45 +0800
committerGitHub <noreply@github.com>2020-09-25 07:01:45 -0400
commitabd04b6af0671517a01781c8bd10fef2a6c32cc4 (patch)
treec22cde6975ccfdfa3cfae58344869a79d26f2659 /synapse/storage
parentFix schema delta for servers that have not backfilled (#8396) (diff)
downloadsynapse-abd04b6af0671517a01781c8bd10fef2a6c32cc4.tar.xz
Allow existing users to login via OpenID Connect. (#8345)
Co-authored-by: Benjamin Koch <bbbsnowball@gmail.com>

This adds configuration flags that will match a user to pre-existing users
when logging in via OpenID Connect. This is useful when switching to
an existing SSO system.
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/databases/main/registration.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/databases/main/registration.py b/synapse/storage/databases/main/registration.py
index 33825e8949..48ce7ecd16 100644
--- a/synapse/storage/databases/main/registration.py
+++ b/synapse/storage/databases/main/registration.py
@@ -393,7 +393,7 @@ class RegistrationWorkerStore(SQLBaseStore):
 
     async def get_user_by_external_id(
         self, auth_provider: str, external_id: str
-    ) -> str:
+    ) -> Optional[str]:
         """Look up a user by their external auth id
 
         Args:
@@ -401,7 +401,7 @@ class RegistrationWorkerStore(SQLBaseStore):
             external_id: id on that system
 
         Returns:
-            str|None: the mxid of the user, or None if they are not known
+            the mxid of the user, or None if they are not known
         """
         return await self.db_pool.simple_select_one_onecol(
             table="user_external_ids",