mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-22 19:04:07 -04:00
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.
This commit is contained in:
parent
3e87d79e1c
commit
abd04b6af0
6 changed files with 76 additions and 17 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue