Skip to content

feat: deprecate OAuth out-of-band flow #175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 24, 2022
Merged

feat: deprecate OAuth out-of-band flow #175

merged 2 commits into from
Feb 24, 2022

Conversation

busunkim96
Copy link
Contributor

https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html?m=1#disallowed-oob The OAuth out-of-band flow is being deprecated and will stop working completely in October 2022.

This adds DeprecationWarnings to:

  1. The setter method redirect_uri in class Flow.
  2. The method run_console in class InstalledAppFlow.

Note that this means the code raises two similar deprecation warnings when run_console is called:


tests/unit/test_flow.py::TestInstalledAppFlow::test_run_console
  /usr/local/google/home/busunkim/github/google-auth-library-python-oauthlib/google_auth_oauthlib/flow.py:423: DeprecationWarning: New clients will be unable to use `InstalledAppFlow.run_console` starting on Feb 28, 2022. All clients will be unable to use this method starting on Oct 3, 2022. Use `InstalledAppFlow.run_local_server` instead. For details on the OOB flow deprecation, see https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html?m=1#disallowed-oob
    warnings.warn(

tests/unit/test_flow.py::TestInstalledAppFlow::test_run_console
  /usr/local/google/home/busunkim/github/google-auth-library-python-oauthlib/google_auth_oauthlib/flow.py:218: DeprecationWarning: 'urn:ietf:wg:oauth:2.0:oob' is an OOB redirect URI. The OAuth out-of-band (OOB) flow is deprecated. New clients will be unable to use this flow starting on Feb 28, 2022. This flow will be deprecated for all clients on Oct 3, 2022. Migrate to an alternative flow. See https://developers.googleblog.com/2022/02/making-oauth-flows-safer.html?m=1#disallowed-oob
    warnings.warn(

@busunkim96 busunkim96 requested a review from a team as a code owner February 18, 2022 19:45
@busunkim96 busunkim96 merged commit 1fb16be into main Feb 24, 2022
@busunkim96 busunkim96 deleted the oob-deprecation branch February 24, 2022 00:11
gcf-merge-on-green bot pushed a commit that referenced this pull request Feb 24, 2022
🤖 I have created a release *beep* *boop*
---


## [0.5.0](v0.4.6...v0.5.0) (2022-02-24)


### Features

* deprecate OAuth out-of-band flow ([#175](#175)) ([1fb16be](1fb16be))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants