Skip to content

Commit

Permalink
Fix Steam backend steam id retrieval
Browse files Browse the repository at this point in the history
  • Loading branch information
omab committed Jul 15, 2013
1 parent 1371262 commit a51a6ac
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion social/backends/steam.py
Expand Up @@ -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/(.*?)$')
Expand Down Expand Up @@ -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)

0 comments on commit a51a6ac

Please sign in to comment.