Comments (9)
Hi @essramos! That log statement should be logging.info(session)
from getting-started-python.
Hi @jonparrott, I figured it was logging.info(session)
, I tried that, and there is no "profile" key from the session.
from getting-started-python.
here is the detail of the session. I just left some of the keys blank.
{
"google_oauth2_credentials": {
"token_response": {
"expires_in": 3600,
"id_token": "",
"token_type" : "Bearer",
"access_token": ""
},
"scopes": [
"profile",
"email"
],
"_class": "OAuth2Credentials",
"revoke_uri": "https://accounts.google.com/o/oauth2/revoke",
"token_info_uri": "https://www.googleapis.com/oauth2/v3/toke\r\nninfo",
"token_uri": "https://www.googleapis.com/oauth2/v4/token",
"refresh_token": null,
"invalid": false,
"id_token": {
"azp": "",
"exp": 1497581985,
"email": "",
"sub": "113869672794459914014",
"at_hash": "",
"iat": 1497578385,
"picture": "https://lh4.googleusercontent.com/-sdrufhE2XEA/AAAAAAAAAAI/AAAAAAAAAGI/v9s7xTQwoxw/s96-c/photo.jpg",
"given_name": "Ella Sh\r\nerilyn",
"aud": "",
"name": "Ella Sherilyn Ramos",
"iss": "https://accounts.google.com",
"family_name": "Ramos",
"locale": "en",
"email_verified": true
},
"user_agent": null,
"client_secret": "",
"access_token": "",
"token_expiry": "2017-06-16T02:59:45Z",
"_modu\r\nle": "oauth2client.client",
"client_id": ""
},
"google_oauth2_csrf_token": ""
}
from getting-started-python.
@essramos just to be sure, can you add a logging statement to _request_user_info to log out the session at the end of the function and see if profile
is in there?
I also think this is the might same issue that @waprin and I observed a while back - the session is becoming too large to fit into a cookie, so chrome is ignoring the cookie.
from getting-started-python.
Hi @jonparrott , by logging out the session on _request_user_info
you mean I should call the end point '/logout'
?
from getting-started-python.
This error came up as well :
ERROR in __init__: Error while obtaining user profile: {'transfer-encoding': 'chunked', 'date': 'Tue, 20 Jun 2017 03:11:32 GMT', 'content
-length': '963', 'x-content-type-options': 'nosniff', 'x-frame-options': 'SAMEORIGIN', 'expires': 'Tue, 20 Jun 2017 03:11:32 GMT', 'server': 'GSE', 'x-xss-protection': '1; mode=block', 'status': '403', '-conte
nt-encoding': 'gzip', 'content-type': 'application/json; charset=UTF-8', 'cache-control': 'private, max-age=0', 'vary': 'Origin, X-Origin'}
from getting-started-python.
Interesting - a 403 means we made an unauthenticated request. Can you try logging credentials.__dict__
as well? Please elide the access and refresh tokens.
from getting-started-python.
On _request_user_info
, I tried to print the content
instead of resp
when catching the error. This is what I got.
ERROR in __init__: Error while obtaining user profile: b'{\n "error": {\n "errors": [\n {\n "domain": "usageLimits",\n "reason": "accessNotConfigured",\n "messa
ge": "Access Not Configured. Google+ API has not been used in project 732114750463 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/plus.googleapis.com/overview?project=732114750463 then retry. If y
ou enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",\n "extendedHelp": "https://console.developers.google.com/apis/api/plus.googleapis.com/overview?project=732114750463"\n }\n ],\n "cod
e": 403,\n "message": "Access Not Configured. Google+ API has not been used in project 732114750463 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/plus.googleapis.com/overview?project=73211475046
3 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry."\n }\n}\n'
And it worked after I enabled the API. Probably a good idea to also print out the content when status is no 200
Thanks for all the help!
from getting-started-python.
@essramos great suggestion. Thanks for being patient and walking through all the debugging steps.
from getting-started-python.
Related Issues (20)
- 'from google.cloud import store' should be 'datastore' HOT 1
- Error: google.auth.exceptions.DefaultCredentialsError: Could not automatically determine credentials. Please set GOOGLE_APPLICATION_CREDENTIALS HOT 2
- Cannot clone git synced repo from google cloud source repository HOT 1
- Folder column in the README is all 404's HOT 2
- bookshelf error on App Engine: "ImportError: cannot import name 'secure_filename' from 'werkzeug'" HOT 7
- testing: enable the Build Cop Bot HOT 1
- Cannot upload image HOT 1
- cleanup: snippet-bot full scan HOT 1
- Action Required: Fix Renovate Configuration
- Bookshelf requirements dependencies broken HOT 3
- 1-hello-world Directory won't exist HOT 3
- Conflicting dependencies in bookshelf app HOT 1
- issues following tutorial HOT 5
- Dependency Dashboard
- Add tests and automated CI HOT 3
- Update testing infrastructure to use Python 3.7 or higher
- Update the Ops Agent script via GitHub Workflow
- Update primary reviewer to python-samples-reviewers
- [email protected]/[email protected]
- Replace python-jose dependency HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from getting-started-python.