From ed188f9c0dcc30c4aef98818124daf3dc3b416d6 Mon Sep 17 00:00:00 2001 From: Christopher Cave-Ayland Date: Mon, 6 Jan 2025 17:43:55 +0000 Subject: [PATCH] Fix striping logic for user names in oauth info_handler. --- site/ic_data_repo/auth/oauth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/ic_data_repo/auth/oauth.py b/site/ic_data_repo/auth/oauth.py index ca849a2..fb7720c 100644 --- a/site/ic_data_repo/auth/oauth.py +++ b/site/ic_data_repo/auth/oauth.py @@ -38,7 +38,7 @@ def info_handler( user=dict( email=data["email"], profile=dict( - username=data["preferred_username"].rstrip("@ic.ac.uk"), + username=data["preferred_username"].removesuffix("@ic.ac.uk"), full_name=data["name"], ), ),