File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -449,6 +449,7 @@ def run_local_server(
449449 success_message = _DEFAULT_WEB_SUCCESS_MESSAGE ,
450450 open_browser = True ,
451451 redirect_uri_trailing_slash = True ,
452+ timeout_seconds = None ,
452453 ** kwargs
453454 ):
454455 """Run the flow using the server strategy.
@@ -478,6 +479,10 @@ def run_local_server(
478479 in the user's browser.
479480 redirect_uri_trailing_slash (bool): whether or not to add trailing
480481 slash when constructing the redirect_uri. Default value is True.
482+ timeout_seconds (int): It will raise an error after the timeout timing
483+ if there are no credentials response. The value is in seconds.
484+ When set to None there is no timeout.
485+ Default value is None.
481486 kwargs: Additional keyword arguments passed through to
482487 :meth:`authorization_url`.
483488
@@ -503,6 +508,7 @@ def run_local_server(
503508
504509 print (authorization_prompt_message .format (url = auth_url ))
505510
511+ local_server .timeout = timeout_seconds
506512 local_server .handle_request ()
507513
508514 # Note: using https here because oauthlib is very picky that
You can’t perform that action at this time.
0 commit comments