Skip to content

Commit

Permalink
Merge e92087f into 75a316b
Browse files Browse the repository at this point in the history
  • Loading branch information
likesclever committed Jan 1, 2022
2 parents 75a316b + e92087f commit c62126a
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 c62126a

Please sign in to comment.