mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-05 14:14:56 -04:00
Improve logging of the mapping from SSO IDs to Matrix IDs. (#8773)
This commit is contained in:
parent
8ca120df7c
commit
59a995f38d
3 changed files with 13 additions and 5 deletions
|
@ -71,19 +71,25 @@ class SsoHandler(BaseHandler):
|
|||
Returns:
|
||||
The mxid of a previously seen user.
|
||||
"""
|
||||
# Check if we already have a mapping for this user.
|
||||
logger.info(
|
||||
logger.debug(
|
||||
"Looking for existing mapping for user %s:%s",
|
||||
auth_provider_id,
|
||||
remote_user_id,
|
||||
)
|
||||
|
||||
# Check if we already have a mapping for this user.
|
||||
previously_registered_user_id = await self.store.get_user_by_external_id(
|
||||
auth_provider_id, remote_user_id,
|
||||
)
|
||||
|
||||
# A match was found, return the user ID.
|
||||
if previously_registered_user_id is not None:
|
||||
logger.info("Found existing mapping %s", previously_registered_user_id)
|
||||
logger.info(
|
||||
"Found existing mapping for IdP '%s' and remote_user_id '%s': %s",
|
||||
auth_provider_id,
|
||||
remote_user_id,
|
||||
previously_registered_user_id,
|
||||
)
|
||||
return previously_registered_user_id
|
||||
|
||||
# No match.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue