Skip to content
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

Update google.rst #454

Merged
merged 2 commits into from Jan 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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