From 4e3d6048fb33097291b630cea3752a90805282a3 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 17 Sep 2019 12:39:31 -0700 Subject: IA auth: use itemname not screenname for username Have run in to several issues with IA screenname being invalid fatcat usernames (eg, containing whitespace). This probably won't catch all such issues, but hopefully most of them. --- python/fatcat_web/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python') diff --git a/python/fatcat_web/auth.py b/python/fatcat_web/auth.py index fc2430f1..860bd3dc 100644 --- a/python/fatcat_web/auth.py +++ b/python/fatcat_web/auth.py @@ -126,7 +126,7 @@ def handle_ia_xauth(email, password): FakeOAuthRemote = namedtuple('FakeOAuthRemote', ['name', 'OAUTH_CONFIG']) remote = FakeOAuthRemote(name='archive', OAUTH_CONFIG={'api_base_url': Config.IA_XAUTH_URI}) oauth_info = { - 'preferred_username': ia_info['screenname'], + 'preferred_username': ia_info['itemname'], 'iss': Config.IA_XAUTH_URI, 'sub': ia_info['itemname'], } -- cgit v1.2.3