googleapis, updated 🕥 2023-03-27 18:02:47

oauthlib integration for Google Auth

|pypi|

This library provides oauthlib integration with google-auth.

.. |build| image:: https://travis-ci.org/googleapis/google-auth-library-python-oauthlib.svg?branch=main :target: https://googleapis.dev/python/google-auth-oauthlib/latest/index.html .. |pypi| image:: https://img.shields.io/pypi/v/google-auth-oauthlib.svg :target: https://pypi.python.org/pypi/google-auth-oauthlib

.. _oauthlib: https://github.com/idan/oauthlib .. _google-auth: https://github.com/googleapis/google-auth-library-python

Installing

You can install using pip_::

$ pip install google-auth-oauthlib

.. _pip: https://pip.pypa.io/en/stable/

Documentation

The latest documentation is available at google-auth-oauthlib.googleapis.dev_.

.. _google-auth-oauthlib.googleapis.dev: https://googleapis.dev/python/google-auth-oauthlib/latest/index.html

Supported Python Versions

Python >= 3.6

Unsupported Python Versions

Python == 2.7, Python == 3.5.

The last version of this library compatible with Python 2.7 and 3.5 is google-auth-oauthlib==0.4.1.

License

Apache 2.0 - See the LICENSE_ for more information.

.. _the LICENSE: https://github.com/googleapis/google-auth-library-python-oauthlib/blob/main/LICENSE

Issues

chore(main): release 1.0.1

opened on 2023-03-27 18:02:46 by release-please[bot]

:robot: I have created a release beep boop

1.0.1 (2023-03-27)

Documentation

  • Fix grammar with fetch_token docstring (#273) (b2e3688)

This PR was generated with Release Please. See documentation.

tests.unit.test_flow.TestInstalledAppFlow: test_run_local_server failed

opened on 2022-12-13 18:09:13 by flaky-bot[bot]

Note: #226 was also for this test, but it was closed more than 10 days ago. So, I didn't mark it flaky.


commit: 0f402dbd40ba865bd22e188d87ace47c336bbd46 buildURL: Build Status, Sponge status: failed

Test output
self = 
webbrowser_mock = 
instance = 
mock_fetch_token = , port = 60434

    @pytest.mark.webtest
    @mock.patch("google_auth_oauthlib.flow.webbrowser", autospec=True)
    def test_run_local_server(self, webbrowser_mock, instance, mock_fetch_token, port):
        auth_redirect_url = urllib.parse.urljoin(
            f"http://localhost:{port}", self.REDIRECT_REQUEST_PATH
        )

        with concurrent.futures.ThreadPoolExecutor(max_workers=1) as pool:
            future = pool.submit(partial(instance.run_local_server, port=port))

            while not future.done():
                try:
                    requests.get(auth_redirect_url)
                except requests.ConnectionError:  # pragma: NO COVER
                    pass

>           credentials = future.result()

tests/unit/test_flow.py:334: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.9/concurrent/futures/_base.py:439: in result
    return self.__get_result()
/usr/local/lib/python3.9/concurrent/futures/_base.py:391: in __get_result
    raise self._exception
/usr/local/lib/python3.9/concurrent/futures/thread.py:58: in run
    result = self.fn(*self.args, **self.kwargs)
google_auth_oauthlib/flow.py:499: in run_local_server
    local_server = wsgiref.simple_server.make_server(
/usr/local/lib/python3.9/wsgiref/simple_server.py:154: in make_server
    server = server_class((host, port), handler_class)
/usr/local/lib/python3.9/socketserver.py:452: in __init__
    self.server_bind()
/usr/local/lib/python3.9/wsgiref/simple_server.py:50: in server_bind
    HTTPServer.server_bind(self)
/usr/local/lib/python3.9/http/server.py:136: in server_bind
    socketserver.TCPServer.server_bind(self)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = 

    def server_bind(self):
        """Called by constructor to bind the socket.

        May be overridden.

        """
        if self.allow_reuse_address:
            self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
>       self.socket.bind(self.server_address)
E       OSError: [Errno 98] Address already in use

/usr/local/lib/python3.9/socketserver.py:466: OSError

feat: adds ability to provide redirect uri

opened on 2022-12-08 22:33:58 by chalmerlowe

WIP PR for discussion: aiming to provide the ability to include a redirect URI, client ID, and client secrets to facilitate the migration away from "out of band" OAuth authentication.

@tswast

See also changes in these repos: * https://github.com/googleapis/python-bigquery-pandas/pull/595 * https://github.com/googleapis/google-auth-library-python-oauthlib/pull/259 * https://github.com/pydata/pydata-google-auth/pull/58

No way to specify the audience id

opened on 2022-09-29 16:29:05 by rseymour

Using your tool to connect to your service it will return an id token with the audience set to the client_id. As far as I can tell there's no way in this code to set that correctly. With OOB copy/paste flow going out of style, you gave us a tool that almost works. But in the end feels like this: image

[Feature Request] Google SSO redirect callback as a POST instead of a GET request

opened on 2022-09-27 14:03:31 by PCS-Ismail

Is there a way to have the redirection callback from Google SSO made as a POST request instead of a GET request, that way all the parameters would be encoded in the body.

Microsoft allows it by changing the response_body parameter when creating the flow (using the msal library).

Reference Link of the requests-oauthlib in docs uses stable which no longer exists

opened on 2022-09-15 19:13:09 by RahulARanger

This issue is related to the reference link of requests-oauthlib for the docs. It was changed from stable to latest as mentioned in PR

Steps to reproduce

  1. Visit docs for the google_auth_oauthlib.flow module
  2. Reference Link for requests-oauthlib uses as stable version instead of requests-oauthlib-latest which no longer exists.

Referenced in helpers.py and flow.py

Thanks!

Releases

v1.0.0 2023-02-07 20:43:29

1.0.0 (2023-02-06)

⚠ BREAKING CHANGES

  • PKCE is enabled by default. (#269)
  • Remove deprecated OOB code (#264)

Features

Bug Fixes

v0.8.0 2022-12-12 21:42:04

0.8.0 (2022-12-08)

Features

v0.7.1 2022-11-03 17:25:52

0.7.1 (2022-11-03)

Bug Fixes

  • Include updates to properties from Google Auth lib (#249) (58becac)

v0.7.0 2022-10-25 21:49:57

0.7.0 (2022-10-25)

Bug Fixes

  • setup.py: increase required google-auth version to >=2.13.0 (f8a15f7)

v0.6.0 2022-10-24 18:57:47

0.6.0 (2022-10-20)

Features

Bug Fixes

  • Add timeout to run_local_server when waiting for response (#245) (8d53bc3)

Documentation

  • Update readme to point to current docs url (#241) (8c29d2e)

v0.5.3 2022-09-14 21:32:28

0.5.3 (2022-09-02)

Bug Fixes

  • Pass port range from get_user_credentials to find_open_port (#212) (479330a)
Google APIs

Clients for Google APIs and tools that help produce them.

GitHub Repository