Revision 0e79735c snf-astakos-app/astakos/im/target/twitter.py
b/snf-astakos-app/astakos/im/target/twitter.py | ||
---|---|---|
56 | 56 |
from astakos.im import settings |
57 | 57 |
from astakos.im import auth_providers |
58 | 58 |
from astakos.im.target import add_pending_auth_provider, get_pending_key, \ |
59 |
handle_third_party_signup, handle_third_party_login |
|
59 |
handle_third_party_signup, handle_third_party_login, init_third_party_session
|
|
60 | 60 |
|
61 | 61 |
import astakos.im.messages as astakos_messages |
62 | 62 |
|
... | ... | |
77 | 77 |
@requires_auth_provider('twitter', login=True) |
78 | 78 |
@require_http_methods(["GET", "POST"]) |
79 | 79 |
def login(request): |
80 |
init_third_party_session(request) |
|
80 | 81 |
force_login = request.GET.get('force_login', |
81 | 82 |
settings.TWITTER_AUTH_FORCE_LOGIN) |
82 | 83 |
resp, content = client.request(request_token_url, "GET") |
... | ... | |
142 | 143 |
|
143 | 144 |
|
144 | 145 |
try: |
145 |
return handle_third_party_login(request, 'google', userid,
|
|
146 |
return handle_third_party_login(request, 'twitter', userid,
|
|
146 | 147 |
provider_info, affiliation) |
147 | 148 |
except AstakosUser.DoesNotExist, e: |
148 | 149 |
third_party_key = get_pending_key(request) |
Also available in: Unified diff