{"action":"created","issue":{"url":"https://api.github.com/repos/grafana/grafana/issues/5683","repository_url":"https://api.github.com/repos/grafana/grafana","labels_url":"https://api.github.com/repos/grafana/grafana/issues/5683/labels{/name}","comments_url":"https://api.github.com/repos/grafana/grafana/issues/5683/comments","events_url":"https://api.github.com/repos/grafana/grafana/issues/5683/events","html_url":"https://github.com/grafana/grafana/issues/5683","id":168341111,"number":5683,"title":"Github login/signup is not working","user":{"login":"marcosnils","id":1578458,"avatar_url":"https://avatars.githubusercontent.com/u/1578458?v=3","gravatar_id":"","url":"https://api.github.com/users/marcosnils","html_url":"https://github.com/marcosnils","followers_url":"https://api.github.com/users/marcosnils/followers","following_url":"https://api.github.com/users/marcosnils/following{/other_user}","gists_url":"https://api.github.com/users/marcosnils/gists{/gist_id}","starred_url":"https://api.github.com/users/marcosnils/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcosnils/subscriptions","organizations_url":"https://api.github.com/users/marcosnils/orgs","repos_url":"https://api.github.com/users/marcosnils/repos","events_url":"https://api.github.com/users/marcosnils/events{/privacy}","received_events_url":"https://api.github.com/users/marcosnils/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-29T14:45:59Z","updated_at":"2016-08-01T14:25:24Z","closed_at":"2016-07-30T17:51:13Z","body":"* **I'm submitting a ...**\r\n- [x] Bug report\r\n- [ ] Feature request\r\n- [ ] Question / Support request: **Please do not** open a github issue. [Support Options](http://grafana.org/support/)\r\n\r\n```\r\napp        | t=2016-07-29T14:42:44+0000 lvl=info msg=\"Request Completed\" logger=context userId=0 orgId=0 uname= method=GET path=/ status=302 remote_addr=181.228.239.46 time_ns=0 size=29\r\napp        | t=2016-07-29T14:43:05+0000 lvl=info msg=\"Request Completed\" logger=context userId=0 orgId=0 uname= method=GET path=/login/github status=302 remote_addr=181.228.239.46 time_ns=0 size=244\r\napp        | t=2016-07-29T14:43:08+0000 lvl=eror msg=\"login.OAuthLogin(get info from github)\" logger=context userId=0 orgId=0 uname= error=\"Get https://api.github.com/user: oauth2: token expired and refresh token is not set\"\r\napp        | t=2016-07-29T14:43:08+0000 lvl=eror msg=\"Request Completed\" logger=context userId=0 orgId=0 uname= method=GET path=/login/github status=500 remote_addr=181.228.239.46 time_ns=61ns size=709\r\n```\r\n\r\nThe GitHub API doesn't provide any refresh_tokens for OAuth (https://developer.github.com/v3/oauth/). However, the oauth2 SDK validates this here: \r\n\r\nhttps://github.com/grafana/grafana/blob/master/Godeps/_workspace/src/golang.org/x/oauth2/oauth2.go#L256-L258\r\n\r\nAny clues?"},"comment":{"url":"https://api.github.com/repos/grafana/grafana/issues/comments/236595587","html_url":"https://github.com/grafana/grafana/issues/5683#issuecomment-236595587","issue_url":"https://api.github.com/repos/grafana/grafana/issues/5683","id":236595587,"user":{"login":"marcosnils","id":1578458,"avatar_url":"https://avatars.githubusercontent.com/u/1578458?v=3","gravatar_id":"","url":"https://api.github.com/users/marcosnils","html_url":"https://github.com/marcosnils","followers_url":"https://api.github.com/users/marcosnils/followers","following_url":"https://api.github.com/users/marcosnils/following{/other_user}","gists_url":"https://api.github.com/users/marcosnils/gists{/gist_id}","starred_url":"https://api.github.com/users/marcosnils/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcosnils/subscriptions","organizations_url":"https://api.github.com/users/marcosnils/orgs","repos_url":"https://api.github.com/users/marcosnils/repos","events_url":"https://api.github.com/users/marcosnils/events{/privacy}","received_events_url":"https://api.github.com/users/marcosnils/received_events","type":"User","site_admin":false},"created_at":"2016-08-01T14:25:24Z","updated_at":"2016-08-01T14:25:24Z","body":"hey @torkelo thx for the update. I'm still having issues with this, I'll share my steps to reproduce: \r\n\r\n-  Setup your OAuth app callback url to http://localhost:3000/login/github\r\n\r\n-  Run a docker images with the following config:\r\n```bash\r\ndocker run -i -p 3000:3000 \\\r\n  -e GF_SERVER_ROOT_URL=http://localhost:3000  \\\r\n  -e GF_SECURITY_ADMIN_PASSWORD=secret  \\\r\n  -e GF_AUTH_GITHUB_ENABLED=true \\\r\n  -e GF_AUTH_GITHUB_CLIENT_ID=<client_id> \\\r\n  -e GF_AUTH_GITHUB_SECRET=<secret> \\\r\n  -e GF_AUTH_GITHUB_SCOPES=user:email,read:org \\\r\n  -e GF_AUTH_GITHUB_ALLOW_SIGN_UP=true \\\r\n  grafana/grafana:3.1.1\r\n```\r\n- Try to login though the web interface and you'll get this error. \r\n\r\nThx in advance.\r\n\r\n\r\n\r\n"}}
{"actor":{"display_login":"marcosnils"}}