diff --git a/social/backends/steam.py b/social/backends/steam.py index 2c7f35eb5..bda0d572e 100644 --- a/social/backends/steam.py +++ b/social/backends/steam.py @@ -2,6 +2,7 @@ import re from social.backends.open_id import OpenIdAuth +from social.exceptions import AuthFailed STEAM_ID = re.compile('steamcommunity.com/openid/id/(.*?)$') @@ -34,4 +35,7 @@ def get_user_details(self, response): return details def _user_id(self, response): - return STEAM_ID.search(response.identity_url) + match = STEAM_ID.search(response.identity_url) + if match is None: + raise AuthFailed(self, 'Missing Steam Id') + return match.group(1)