Skip to content

Commit 95b9042

Browse files
committed
allows the TwitterMixin define the callback_uri, that solves issue tornadoweb#377
1 parent fa15928 commit 95b9042

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tornado/auth.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,14 +451,14 @@ def _on_auth(self, user):
451451
_OAUTH_NO_CALLBACKS = False
452452

453453

454-
def authenticate_redirect(self):
454+
def authenticate_redirect(self, callback_uri = None):
455455
"""Just like authorize_redirect(), but auto-redirects if authorized.
456456
457457
This is generally the right interface to use if you are using
458458
Twitter for single-sign on.
459459
"""
460460
http = httpclient.AsyncHTTPClient()
461-
http.fetch(self._oauth_request_token_url(), self.async_callback(
461+
http.fetch(self._oauth_request_token_url(callback_uri = callback_uri), self.async_callback(
462462
self._on_request_token, self._OAUTH_AUTHENTICATE_URL, None))
463463

464464
def twitter_request(self, path, callback, access_token=None,

0 commit comments

Comments
 (0)