aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-09-17 12:39:31 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-09-17 12:39:34 -0700
commit4e3d6048fb33097291b630cea3752a90805282a3 (patch)
tree999e42bc32c25c01d7a1bfbce3b7e893fe6ea4aa
parent0b22af5b652787d97ca747304a583c558e301c41 (diff)
downloadfatcat-4e3d6048fb33097291b630cea3752a90805282a3.tar.gz
fatcat-4e3d6048fb33097291b630cea3752a90805282a3.zip
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.
-rw-r--r--python/fatcat_web/auth.py2
1 files changed, 1 insertions, 1 deletions
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'],
}