Skip to content

Commit a1da72d

Browse files
tomasreimersJon Wayne Parrott
authored and
Jon Wayne Parrott
committed
Pass prompt='consent' from flow_from_clientsecrets (googleapis#717)
1 parent 00926f2 commit a1da72d

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

oauth2client/client.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2092,7 +2092,8 @@ def step2_exchange(self, code=None, http=None, device_flow_info=None):
20922092
@_helpers.positional(2)
20932093
def flow_from_clientsecrets(filename, scope, redirect_uri=None,
20942094
message=None, cache=None, login_hint=None,
2095-
device_uri=None, pkce=None, code_verifier=None):
2095+
device_uri=None, pkce=None, code_verifier=None,
2096+
prompt=None):
20962097
"""Create a Flow from a clientsecrets file.
20972098
20982099
Will create the right kind of Flow based on the contents of the
@@ -2141,7 +2142,13 @@ def flow_from_clientsecrets(filename, scope, redirect_uri=None,
21412142
'login_hint': login_hint,
21422143
}
21432144
revoke_uri = client_info.get('revoke_uri')
2144-
optional = ('revoke_uri', 'device_uri', 'pkce', 'code_verifier')
2145+
optional = (
2146+
'revoke_uri',
2147+
'device_uri',
2148+
'pkce',
2149+
'code_verifier',
2150+
'prompt'
2151+
)
21452152
for param in optional:
21462153
if locals()[param] is not None:
21472154
constructor_kwargs[param] = locals()[param]

0 commit comments

Comments
 (0)