obfuscurity / descartes

Introspective dashboard for Graphite
MIT License
502 stars 65 forks source link

Failing to authentication using github oauth #97

Closed emourant closed 11 years ago

emourant commented 11 years ago

I am having trouble setting descartes using github oauth. Github is successfully authenticating me and redirecting back to http://10.5.0.210:5000/auth/github/callback?code=...&state=... At this point descartes is responding with 403 to the browser

I have tried resetting the oauth application and all of the cookies. I am a member of the Github organization.

Am I doing something stupid here. Any help you can provide me on this issue would be greatly appreciated.

Here is the logs I have from descartes

23:42:27 web.1 | started with pid 13274 23:42:32 web.1 | >> Thin web server (v1.2.10 codename I'm dumb) 23:42:32 web.1 | >> Maximum connections set to 1024 23:42:32 web.1 | >> Listening on 0.0.0.0:5000, CTRL+C to stop 23:42:40 web.1 | 10.4.0.106 - - [07/Apr/2013 23:42:40] "GET / HTTP/1.1" 302 - 0.0362 23:42:40 web.1 | 10.4.0.106 - - [07/Apr/2013 23:42:40] "GET /auth/unauthorized HTTP/1.1" 302 - 0.0013 23:42:42 web.1 | 10.4.0.106 - - [07/Apr/2013 23:42:42] "GET /_images/securocat.png HTTP/1.1" 302 - 0.0017 23:42:42 web.1 | 10.4.0.106 - - [07/Apr/2013 23:42:42] "GET /auth/unauthorized HTTP/1.1" 302 - 0.0012 23:42:44 web.1 | 10.4.0.106 - - [07/Apr/2013 23:42:44] "GET /favicon.ico HTTP/1.1" 302 - 0.0698 23:42:44 web.1 | 10.4.0.106 - - [07/Apr/2013 23:42:44] "GET /auth/unauthorized HTTP/1.1" 302 - 0.0038

here are my environment variables(obfuscated)

GRAPHITE_URL=xxxxxxxx GRAPHITE_USER=xxxxxxxxxx GRAPHITE_PASS=xxxxxxxxxx METRICS_UPDATE_INTERVAL=5m RACK_ENV=production SESSION_SECRET=xxxxxxxx OAUTH_PROVIDER=github GITHUB_CLIENT_ID=xxxxxxxxxxxxxxxx GITHUB_CLIENT_SECRET=xxxxxxxxxxxxxxxx GITHUB_ORG_ID=sc-discartes DATABASE_URL="postgres://descartes:xxxxxxxxxx@localhost"

brntbeer commented 11 years ago

Hi @emourant,

This happens kind of often, but it should be pretty easy to fix! no worries.

  1. I looked to see if sc-discartes was an organization on github, it doesn't seem to be. Could you check that it is live for me? Or maybe point me in the direction of your Org if this isnt the one we're suppose to be looking at
  2. Although you may be a member of the org you're looking for, are you a public member? I believe this may be part of the way github oauth ensures that people who are private members aren't allowed access.

Hope this helps!

emourant commented 11 years ago

sc-discartes is the application name. The organization is sittercity. I think you might be on to something with the public membership. I am an owner of the organization but im not sure how to tell if I am already or how to set myself as a public member. Do i need to use the api for this?

obfuscurity commented 11 years ago

If you go to https://github.com/<org>?tab=members it will let you publicize or conceal your membership. If the button next to your name says Cancel Membership it means you're public.

brntbeer commented 11 years ago

Ah. looks like we need a combo of 1 and 2 then.

you need to set GITHUB_ORG_ID=sittercity and to ensure public membership, you need to take a look over at https://github.com/sittercity?tab=members, find your name and click "publicize"

emourant commented 11 years ago

Great, That looks like it has done the trick. Thanks!

brntbeer commented 11 years ago

Happy to hear it!