Skip to content

Commit

Permalink
Update google.rst (#454)
Browse files Browse the repository at this point in the history
* Update google.rst

https://developers.google.com/identity/protocols/oauth2/openid-connect?hl=en#scope-param
https://developers.google.com/identity/protocols/oauth2/scopes#oauth2

* non-functional changes to kick off new pipeline

Co-authored-by: jtroussard <jacques.troussard@gmail.com>
  • Loading branch information
likesclever and jtroussard committed Jan 1, 2022
1 parent 75a316b commit 00e8156
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/examples/google.rst
@@ -1,23 +1,24 @@
Google OAuth 2 Tutorial
==========================

Setup a new web project in the `Google Cloud Console`_
When you have obtained a ``client_id``, ``client_secret`` and registered
Setup a new web project in the `Google Cloud Console`, (application type: web application)_
When you have obtained a ``client_id``, ``client_secret``, and registered
a callback URL then you can try out the command line interactive example below.

.. _`Google Cloud Console`: https://cloud.google.com/console/project

.. code-block:: pycon
>>> # Credentials you get from registering a new application
>>> client_id = '<the id you get from google>.apps.googleusercontent.com'
>>> client_id = '<the id you get from google>'
>>> client_secret = '<the secret you get from google>'
>>> redirect_uri = 'https://your.registered/callback'
>>> # OAuth endpoints given in the Google API documentation
>>> authorization_base_url = "https://accounts.google.com/o/oauth2/v2/auth"
>>> token_url = "https://www.googleapis.com/oauth2/v4/token"
>>> scope = [
... "openid",
... "https://www.googleapis.com/auth/userinfo.email",
... "https://www.googleapis.com/auth/userinfo.profile"
... ]
Expand Down

0 comments on commit 00e8156

Please sign in to comment.