We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d524595 commit 7fffdedCopy full SHA for 7fffded
oauth2cli/oauth2.py
@@ -28,6 +28,9 @@
28
string_types = (str,) if sys.version_info[0] >= 3 else (basestring, )
29
30
31
+class BrowserInteractionTimeoutError(RuntimeError):
32
+ pass
33
+
34
class BaseClient(object):
35
# This low-level interface works. Yet you'll find its sub-class
36
# more friendly to remind you what parameters are needed in each scenario.
@@ -674,6 +677,8 @@ def _obtain_token_by_browser(
674
677
auth_uri_callback=auth_uri_callback,
675
678
browser_name=browser_name,
676
679
)
680
+ if auth_response is None:
681
+ raise BrowserInteractionTimeoutError("User did not complete the flow in time")
682
return self.obtain_token_by_auth_code_flow(
683
flow, auth_response, scope=scope, **kwargs)
684
0 commit comments