File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
optional-kubernetes-engine/bookshelf Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -108,14 +108,14 @@ def get_model():
108108
109109def _request_user_info (credentials ):
110110 """
111- Makes an HTTP request to the Google+ API to retrieve the user's basic
111+ Makes an HTTP request to the Google OAuth2 API to retrieve the user's basic
112112 profile information, including full name and photo, and stores it in the
113113 Flask session.
114114 """
115115 http = httplib2 .Http ()
116116 credentials .authorize (http )
117117 resp , content = http .request (
118- 'https://www.googleapis.com/plus/v1/people/me ' )
118+ 'https://www.googleapis.com/oauth2/v3/userinfo ' )
119119
120120 if resp .status != 200 :
121121 current_app .logger .error (
Original file line number Diff line number Diff line change @@ -90,8 +90,8 @@ def add():
9090
9191 # If the user is logged in, associate their profile with the new book.
9292 if 'profile' in session :
93- data ['createdBy' ] = session ['profile' ]['displayName ' ]
94- data ['createdById' ] = session ['profile' ]['id ' ]
93+ data ['createdBy' ] = session ['profile' ]['name ' ]
94+ data ['createdById' ] = session ['profile' ]['email ' ]
9595
9696 book = get_model ().create (data )
9797
You can’t perform that action at this time.
0 commit comments