{"action":"closed","issue":{"url":"https://api.github.com/repos/peterhudec/authomatic/issues/69","labels_url":"https://api.github.com/repos/peterhudec/authomatic/issues/69/labels{/name}","comments_url":"https://api.github.com/repos/peterhudec/authomatic/issues/69/comments","events_url":"https://api.github.com/repos/peterhudec/authomatic/issues/69/events","html_url":"https://github.com/peterhudec/authomatic/issues/69","id":50407090,"number":69,"title":"Google and Twiter return empty user data on Flask!","user":{"login":"Panter7777","id":9367120,"avatar_url":"https://avatars.githubusercontent.com/u/9367120?v=3","gravatar_id":"","url":"https://api.github.com/users/Panter7777","html_url":"https://github.com/Panter7777","followers_url":"https://api.github.com/users/Panter7777/followers","following_url":"https://api.github.com/users/Panter7777/following{/other_user}","gists_url":"https://api.github.com/users/Panter7777/gists{/gist_id}","starred_url":"https://api.github.com/users/Panter7777/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Panter7777/subscriptions","organizations_url":"https://api.github.com/users/Panter7777/orgs","repos_url":"https://api.github.com/users/Panter7777/repos","events_url":"https://api.github.com/users/Panter7777/events{/privacy}","received_events_url":"https://api.github.com/users/Panter7777/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-11-28T22:46:24Z","updated_at":"2015-03-25T06:25:09Z","closed_at":"2015-03-25T06:25:09Z","body":"Hello. I don't understand what is wrong?\r\ncallback uri:\r\ngoogle - http://127.0.0.1:5000/auth/google/\r\ntwitter - http://127.0.0.1:5000/auth/tw/\r\n\r\nconfig:\r\n==============================================\r\n```\r\nfrom authomatic.providers import oauth2, oauth1\r\nSECRET_KEY = '####'\r\nAUTH_CONFIG = {\r\n    'google': {\r\n        'class_': oauth2.Google,\r\n        'consumer_key': '####',\r\n        'consumer_secret': ####',\r\n        'scope': ['email',],\r\n    },\r\n    'tw': {\r\n        'class_': oauth1.Twitter,\r\n        'consumer_key': '####',\r\n        'consumer_secret': '####',\r\n    },\r\n}\r\n```\r\ncontroller:\r\n================================================\r\n```\r\nfrom authomatic.adapters import WerkzeugAdapter\r\nfrom authomatic import Authomatic\r\nfrom app import app, db\r\nfrom app.models.users import User\r\n\r\n\r\nauthomatic = Authomatic(\r\n    app.config.get('AUTH_CONFIG'),\r\n    app.config.get('SECRET_KEY'),\r\n    report_errors=True\r\n)\r\n\r\n\r\n@app.route('/auth/<provider>/', methods=['GET', 'POST'])\r\ndef auth(provider):\r\n    print \"REQUEST: \", request.args\r\n    response = make_response()\r\n    result = authomatic.login(WerkzeugAdapter(request, response), provider)\r\n    if result:\r\n        if result.user:\r\n            result.user.update()\r\n            if result.user.email:\r\n                user = User.query.filter(User.email == result.user.email).first()\r\n                if user is None:\r\n                    user = User(nickname=result.user.name, email=result.user.email)\r\n                    db.session.add(user)\r\n                    db.session.commit()\r\n                flash('A new user profile has been created for you.')\r\n                return redirect(url_for('index'))\r\n            flash('Your provider return empty data, try again later.')\r\n            return redirect(url_for('index'))\r\n    return response\r\n```\r\n\r\n\r\nand after I accept access to app in google or twitter, I have redirected to index.html page with flash massage \"Your provider return empty data, try again later\"\r\n\r\nin console I see:\r\ngoogle:\r\n```\r\n127.0.0.1 - - [29/Nov/2014 00:41:26] \"GET /login/ HTTP/1.1\" 200 -\r\nREQUEST:  ImmutableMultiDict([])\r\n127.0.0.1 - - [29/Nov/2014 00:41:27] \"GET /auth/google/ HTTP/1.1\" 302 -\r\nREQUEST:  ImmutableMultiDict([('state', u'bbee8547ff97e001sdss61e6'), ('code', u'4/ZJRhjCqEzAVep9UL2epaTzYI')])\r\n127.0.0.1 - - [29/Nov/2014 00:41:30] \"GET /auth/google/?state=bbee8547ff97e001d3d77161e6&code=4/ZJRhjCqEzAVep9UL2epaTzYI HTTP/1.1\" 302 -\r\n127.0.0.1 - - [29/Nov/2014 00:41:30] \"GET / HTTP/1.1\" 200 -\r\n```\r\ntwitter:\r\n```\r\n127.0.0.1 - - [29/Nov/2014 00:43:38] \"GET /login/ HTTP/1.1\" 200 -\r\nREQUEST:  ImmutableMultiDict([])\r\n127.0.0.1 - - [29/Nov/2014 00:43:42] \"GET /auth/tw/ HTTP/1.1\" 302 -\r\nREQUEST:  ImmutableMultiDict([('oauth_token', u'KmF9L1m5CYUY9O6joIh0'), ('oauth_verifier', u'95sGsiRz5sTxZua88G')])\r\n127.0.0.1 - - [29/Nov/2014 00:43:44] \"GET /auth/tw/?oauth_token=KmF9L1m5CYUY9O6joIh0&oauth_verifier=95sGsiRz5sTxZua88G HTTP/1.1\" 302 -\r\n127.0.0.1 - - [29/Nov/2014 00:43:44] \"GET / HTTP/1.1\" 200 -\r\n```\r\n\r\n\r\nMay be some thing wrong if i get 302 - on response???\r\n\r\nPlease help me!"}}