You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"'{}' is an OOB redirect URI. The OAuth out-of-band (OOB) flow is deprecated. "
220
+
"New clients will be unable to use this flow starting on Feb 28, 2022. "
221
+
"This flow will be deprecated for all clients on Oct 3, 2022. "
222
+
"Migrate to an alternative flow. "
223
+
"See https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html?m=1#disallowed-oob".format(
224
+
value
225
+
),
226
+
DeprecationWarning,
227
+
)
214
228
self.oauth2session.redirect_uri=value
215
229
216
230
defauthorization_url(self, **kwargs):
@@ -325,9 +339,7 @@ class InstalledAppFlow(Flow):
325
339
local development or applications that are installed on a desktop operating
326
340
system.
327
341
328
-
This flow has two strategies: The console strategy provided by
329
-
:meth:`run_console` and the local server strategy provided by
330
-
:meth:`run_local_server`.
342
+
This flow uses a local server strategy provided by :meth:`run_local_server`.
331
343
332
344
Example::
333
345
@@ -348,8 +360,8 @@ class InstalledAppFlow(Flow):
348
360
# {'name': '...', 'email': '...', ...}
349
361
350
362
351
-
Note that these aren't the only two ways to accomplish the installed
352
-
application flow, they are just the most common ways. You can use the
363
+
Note that this isn't the only way to accomplish the installed
364
+
application flow, just one of the most common. You can use the
353
365
:class:`Flow` class to perform the same flow with different methods of
354
366
presenting the authorization URL to the user or obtaining the authorization
355
367
response, such as using an embedded web view.
@@ -381,6 +393,15 @@ def run_console(
381
393
):
382
394
"""Run the flow using the console strategy.
383
395
396
+
.. deprecated:: 0.5.0
397
+
Use :meth:`run_local_server` instead.
398
+
399
+
The OAuth out-of-band (OOB) flow is deprecated. New clients will be unable to
400
+
use this flow starting on Feb 28, 2022. This flow will be deprecated
401
+
for all clients on Oct 3, 2022. Migrate to an alternative flow.
402
+
403
+
See https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html?m=1#disallowed-oob"
404
+
384
405
The console strategy instructs the user to open the authorization URL
385
406
in their browser. Once the authorization is complete the authorization
386
407
server will give the user a code. The user then must copy & paste this
@@ -399,6 +420,13 @@ def run_console(
399
420
for the user.
400
421
"""
401
422
kwargs.setdefault("prompt", "consent")
423
+
warnings.warn(
424
+
"New clients will be unable to use `InstalledAppFlow.run_console` "
425
+
"starting on Feb 28, 2022. All clients will be unable to use this method starting on Oct 3, 2022. "
426
+
"Use `InstalledAppFlow.run_local_server` instead. For details on the OOB flow deprecation, "
427
+
"see https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html?m=1#disallowed-oob",
0 commit comments