File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
Google OAuth 2 Tutorial
2
2
==========================
3
3
4
- Setup a new web project in the `Google Cloud Console `_
5
- When you have obtained a ``client_id ``, ``client_secret `` and registered
4
+ Setup a new web project in the `Google Cloud Console `, (application type: web application) _
5
+ When you have obtained a ``client_id ``, ``client_secret ``, and registered
6
6
a callback URL then you can try out the command line interactive example below.
7
7
8
8
.. _`Google Cloud Console` : https://cloud.google.com/console/project
9
9
10
10
.. code-block :: pycon
11
11
12
12
>>> # Credentials you get from registering a new application
13
- >>> client_id = '<the id you get from google>.apps.googleusercontent.com '
13
+ >>> client_id = '<the id you get from google>'
14
14
>>> client_secret = '<the secret you get from google>'
15
15
>>> redirect_uri = 'https://your.registered/callback'
16
16
17
17
>>> # OAuth endpoints given in the Google API documentation
18
18
>>> authorization_base_url = "https://accounts.google.com/o/oauth2/v2/auth"
19
19
>>> token_url = "https://www.googleapis.com/oauth2/v4/token"
20
20
>>> scope = [
21
+ ... "openid",
21
22
... "https://www.googleapis.com/auth/userinfo.email",
22
23
... "https://www.googleapis.com/auth/userinfo.profile"
23
24
... ]
You can’t perform that action at this time.
0 commit comments