{"action":"created","issue":{"url":"https://api.github.com/repos/radiasoft/sirepo/issues/753","repository_url":"https://api.github.com/repos/radiasoft/sirepo","labels_url":"https://api.github.com/repos/radiasoft/sirepo/issues/753/labels{/name}","comments_url":"https://api.github.com/repos/radiasoft/sirepo/issues/753/comments","events_url":"https://api.github.com/repos/radiasoft/sirepo/issues/753/events","html_url":"https://github.com/radiasoft/sirepo/issues/753","id":231658581,"number":753,"title":"oauth - error when logging in in several browsers simultaneously","user":{"login":"mrakitin","id":13209176,"avatar_url":"https://avatars0.githubusercontent.com/u/13209176?v=4","gravatar_id":"","url":"https://api.github.com/users/mrakitin","html_url":"https://github.com/mrakitin","followers_url":"https://api.github.com/users/mrakitin/followers","following_url":"https://api.github.com/users/mrakitin/following{/other_user}","gists_url":"https://api.github.com/users/mrakitin/gists{/gist_id}","starred_url":"https://api.github.com/users/mrakitin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrakitin/subscriptions","organizations_url":"https://api.github.com/users/mrakitin/orgs","repos_url":"https://api.github.com/users/mrakitin/repos","events_url":"https://api.github.com/users/mrakitin/events{/privacy}","received_events_url":"https://api.github.com/users/mrakitin/received_events","type":"User","site_admin":false},"labels":[{"id":289031205,"url":"https://api.github.com/repos/radiasoft/sirepo/labels/1st%20Priority","name":"1st Priority","color":"e11d21","default":false},{"id":224755915,"url":"https://api.github.com/repos/radiasoft/sirepo/labels/bug","name":"bug","color":"eb6420","default":true}],"state":"open","locked":false,"assignee":{"login":"robnagler","id":5495179,"avatar_url":"https://avatars1.githubusercontent.com/u/5495179?v=4","gravatar_id":"","url":"https://api.github.com/users/robnagler","html_url":"https://github.com/robnagler","followers_url":"https://api.github.com/users/robnagler/followers","following_url":"https://api.github.com/users/robnagler/following{/other_user}","gists_url":"https://api.github.com/users/robnagler/gists{/gist_id}","starred_url":"https://api.github.com/users/robnagler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robnagler/subscriptions","organizations_url":"https://api.github.com/users/robnagler/orgs","repos_url":"https://api.github.com/users/robnagler/repos","events_url":"https://api.github.com/users/robnagler/events{/privacy}","received_events_url":"https://api.github.com/users/robnagler/received_events","type":"User","site_admin":false},"assignees":[{"login":"robnagler","id":5495179,"avatar_url":"https://avatars1.githubusercontent.com/u/5495179?v=4","gravatar_id":"","url":"https://api.github.com/users/robnagler","html_url":"https://github.com/robnagler","followers_url":"https://api.github.com/users/robnagler/followers","following_url":"https://api.github.com/users/robnagler/following{/other_user}","gists_url":"https://api.github.com/users/robnagler/gists{/gist_id}","starred_url":"https://api.github.com/users/robnagler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robnagler/subscriptions","organizations_url":"https://api.github.com/users/robnagler/orgs","repos_url":"https://api.github.com/users/robnagler/repos","events_url":"https://api.github.com/users/robnagler/events{/privacy}","received_events_url":"https://api.github.com/users/robnagler/received_events","type":"User","site_admin":false}],"milestone":null,"comments":12,"created_at":"2017-05-26T15:25:33Z","updated_at":"2017-08-10T23:59:51Z","closed_at":null,"body":"An attempt to log in using GitHub credentials on two separate browsers results in a bad gateway error in the second browser, and there is the following error message in the server's log:\r\n```py\r\n/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/sirepo-20170503.175512-py2.7.egg/sirepo/uri_router.py:174:_dispatch oauth-authorized/github: error: KeyError:\r\n'oauth_nonce'\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/flask/app.py\", line 1997, in __call__\r\n    return self.wsgi_app(environ, start_response)\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/beaker/middleware.py\", line 156, in __call__\r\n    return self.wrap_app(environ, session_start_response)\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/sirepo-20170503.175512-py2.7.egg/sirepo/server.py\", line 714, in __call__\r\n    return self.wsgi_app(environ, start_response)\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/flask/app.py\", line 1982, in wsgi_app\r\n    response = self.full_dispatch_request()\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/flask/app.py\", line 1612, in full_dispatch_request\r\n    rv = self.dispatch_request()\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/flask/app.py\", line 1598, in dispatch_request\r\n    return self.view_functions[rule.endpoint](**req.view_args)\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/sirepo-20170503.175512-py2.7.egg/sirepo/uri_router.py\", line 168, in _dispatch\r\n    return route.func(**kwargs)\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/sirepo-20170503.175512-py2.7.egg/sirepo/server.py\", line 348, in api_oauthAuthorized\r\n    return oauth.authorized_callback(app, oauth_type)\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/sirepo-20170503.175512-py2.7.egg/sirepo/oauth.py\", line 70, in authorized_callback\r\n    state = _remove_session_key('oauth_nonce')\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/sirepo-20170503.175512-py2.7.egg/sirepo/oauth.py\", line 144, in _remove_session_key\r\n    value = flask.session[name]\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/werkzeug/local.py\", line 377, in <lambda>\r\n    __getitem__ = lambda x, i: x._get_current_object()[i]\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/beaker/session.py\", line 754, in __getitem__\r\n    return self._session()[key]\r\nTraceback (most recent call last):\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/flask/app.py\", line 1997, in __call__\r\n    return self.wsgi_app(environ, start_response)\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/beaker/middleware.py\", line 156, in __call__\r\n    return self.wrap_app(environ, session_start_response)\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/sirepo-20170503.175512-py2.7.egg/sirepo/server.py\", line 714, in __call__\r\n    return self.wsgi_app(environ, start_response)\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/flask/app.py\", line 1985, in wsgi_app\r\n    response = self.handle_exception(e)\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/flask/app.py\", line 1540, in handle_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/flask/app.py\", line 1982, in wsgi_app\r\n    response = self.full_dispatch_request()\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/flask/app.py\", line 1614, in full_dispatch_request\r\n    rv = self.handle_user_exception(e)\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/flask/app.py\", line 1517, in handle_user_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/flask/app.py\", line 1612, in full_dispatch_request\r\n    rv = self.dispatch_request()\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/flask/app.py\", line 1598, in dispatch_request\r\n    return self.view_functions[rule.endpoint](**req.view_args)\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/sirepo-20170503.175512-py2.7.egg/sirepo/uri_router.py\", line 168, in _dispatch\r\n    return route.func(**kwargs)\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/sirepo-20170503.175512-py2.7.egg/sirepo/server.py\", line 348, in api_oauthAuthorized\r\n    return oauth.authorized_callback(app, oauth_type)\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/sirepo-20170503.175512-py2.7.egg/sirepo/oauth.py\", line 70, in authorized_callback\r\n    state = _remove_session_key('oauth_nonce')\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/sirepo-20170503.175512-py2.7.egg/sirepo/oauth.py\", line 144, in _remove_session_key\r\n    value = flask.session[name]\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/werkzeug/local.py\", line 377, in <lambda>\r\n    __getitem__ = lambda x, i: x._get_current_object()[i]\r\n  File \"/home/vagrant/.pyenv/versions/2.7.10/envs/py2/lib/python2.7/site-packages/beaker/session.py\", line 754, in __getitem__\r\n    return self._session()[key]\r\nKeyError: 'oauth_nonce'\r\n```\r\nWhen the second browser is restarted, the user becomes authenticated."},"comment":{"url":"https://api.github.com/repos/radiasoft/sirepo/issues/comments/321704251","html_url":"https://github.com/radiasoft/sirepo/issues/753#issuecomment-321704251","issue_url":"https://api.github.com/repos/radiasoft/sirepo/issues/753","id":321704251,"user":{"login":"bruhwiler","id":3825435,"avatar_url":"https://avatars1.githubusercontent.com/u/3825435?v=4","gravatar_id":"","url":"https://api.github.com/users/bruhwiler","html_url":"https://github.com/bruhwiler","followers_url":"https://api.github.com/users/bruhwiler/followers","following_url":"https://api.github.com/users/bruhwiler/following{/other_user}","gists_url":"https://api.github.com/users/bruhwiler/gists{/gist_id}","starred_url":"https://api.github.com/users/bruhwiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bruhwiler/subscriptions","organizations_url":"https://api.github.com/users/bruhwiler/orgs","repos_url":"https://api.github.com/users/bruhwiler/repos","events_url":"https://api.github.com/users/bruhwiler/events{/privacy}","received_events_url":"https://api.github.com/users/bruhwiler/received_events","type":"User","site_admin":false},"created_at":"2017-08-10T23:59:51Z","updated_at":"2017-08-10T23:59:51Z","body":"Is it important to understand and resolve this problem?\r\nIt seems to me like an artificial situation which will not be experienced by regular users.\r\n"}}
{"actor":{"display_login":"bruhwiler"}}