Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Commit

Permalink
Pass prompt='consent' from flow_from_clientsecrets (#717)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasreimers authored and Jon Wayne Parrott committed Jun 1, 2017
1 parent 00926f2 commit a1da72d
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions oauth2client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2092,7 +2092,8 @@ def step2_exchange(self, code=None, http=None, device_flow_info=None):
@_helpers.positional(2)
def flow_from_clientsecrets(filename, scope, redirect_uri=None,
message=None, cache=None, login_hint=None,
device_uri=None, pkce=None, code_verifier=None):
device_uri=None, pkce=None, code_verifier=None,
prompt=None):
"""Create a Flow from a clientsecrets file.
Will create the right kind of Flow based on the contents of the
Expand Down Expand Up @@ -2141,7 +2142,13 @@ def flow_from_clientsecrets(filename, scope, redirect_uri=None,
'login_hint': login_hint,
}
revoke_uri = client_info.get('revoke_uri')
optional = ('revoke_uri', 'device_uri', 'pkce', 'code_verifier')
optional = (
'revoke_uri',
'device_uri',
'pkce',
'code_verifier',
'prompt'
)
for param in optional:
if locals()[param] is not None:
constructor_kwargs[param] = locals()[param]
Expand Down

0 comments on commit a1da72d

Please sign in to comment.