Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github auth callback URL? #46

Closed
brylie opened this issue Nov 12, 2014 · 15 comments
Closed

Github auth callback URL? #46

brylie opened this issue Nov 12, 2014 · 15 comments
Milestone

Comments

@brylie
Copy link
Contributor

brylie commented Nov 12, 2014

I am trying to configure Github authentication strategy. On the Github OAuth Application Settings page, there is a field for Authorization callback URL. What value should I put here?

  • <example.com>/what/callback/url
@brylie
Copy link
Contributor Author

brylie commented Nov 12, 2014

After some trial and error, I found that the URL seems to be:

  • <example.com>/admins/auth/github/callback/

However, I am not sure whether it should have the trailing slash.

Also, I am now getting a vague error after the redirect:

We're sorry, but something went wrong.

We've been notified about this issue and we'll take a look at it shortly.

@brylie
Copy link
Contributor Author

brylie commented Nov 12, 2014

I cannot find any details in the web_error.log. As an idea, would it be possible that Mozilla Persona login is blocking the Github login from using the same email address?

@brylie
Copy link
Contributor Author

brylie commented Nov 12, 2014

Please help update the Authentication Strategies document with details related to this issue.

@brylie brylie changed the title Document Github auth callback URL Github auth callback URL? Nov 12, 2014
@GUI
Copy link
Member

GUI commented Nov 12, 2014

Sorry for the troubles, but I really appreciate you taking the time to file issues and start the wiki page documenting things. It will be later this evening before I can really get to this, but I'll try to step through the process of getting the various authentication strategies setup from scratch and get the documentation updated.

But you are able to login to the admin with Persona, is that correct?

Regarding the "something went wrong" error, you should be fine with accounts that have logged in between different services (I regularly switch between a few different ones, although not GitHub, so this might be specific to GitHub auth). I'll also try to reproduce that issue later, but if you get a chance, I think those errors should actually be in /var/log/api-umbrella/supervisor/web-puma.log. So if you spot anything in there, would you mind sharing? Thanks!

@brylie
Copy link
Contributor Author

brylie commented Nov 13, 2014

In web-puma.log there is a stack trace beginning with:

NoMethodError (private method `select' called for nil:NilClass):
  app/controllers/admin/admins/omniauth_callbacks_controller.rb:33:in `github'
  ...
  ...

Should I file this as a separate issue?

@brylie
Copy link
Contributor Author

brylie commented Nov 13, 2014

But you are able to login to the admin with Persona, is that correct?

Yep. Persona works! :)

@GUI
Copy link
Member

GUI commented Nov 14, 2014

Apologies I wasn't able to get to this today or yesterday, like I thought. It will more likely be this weekend before I'll be able to take a look at this, but I definitely want to get this all documented. Sorry! But thanks again for pointing all this out.

@GUI
Copy link
Member

GUI commented Nov 18, 2014

As I noted in the other thread, I updated the auth strategies documentation. The configuration you have here all looks correct, but this actually looks like an issue on our app's end, since it's throwing that error in the logs. I'm not encountering that error when I login via my GitHub account, but I suspect this has to do with differences in our GitHub accounts.

It looks like it's bombing on this line where we're attempting to only acknowledge the verified e-mail addresses from GitHub. So a few questions about your GitHub account your trying to login with:

  • Is your e-mail verified? If not, there should be a "Send verification email" next to the e-mail on the e-mail page.
  • On that same e-mail page do you have multiple e-mails belonging to this account, or just one?
  • If you have multiple e-mails setup, is the e-mail your trying to login with the one marked as primary?

Thanks for discovering this bug, and hopefully we can get it sorted out. We don't have this github auth enabled in our API Umbrella installations, so it unfortunately hasn't seen a lot of real-world testing with different types of user accounts. The Google auth has seen a lot more real-world testing, so if we can get that working, that may also be easier.

@brylie
Copy link
Contributor Author

brylie commented Nov 18, 2014

Is your e-mail verified? If not, there should be a "Send verification email" next to the e-mail on the e-mail page.
On that same e-mail page do you have multiple e-mails belonging to this account, or just one?
If you have multiple e-mails setup, is the e-mail your trying to login with the one marked as primary?

  • Yes, my email is verified.
  • Yes, I have multiple, verified emails.
  • Yes, I am trying to login with my primary email (sometimes just my username, or I am already logged in).

@bragan
Copy link

bragan commented Jan 13, 2015

I just opened another issue before finding this one about the same topic: #88

It appears i am having the exact same problem. Are there any suggestions for a fix?

GUI added a commit to NREL/api-umbrella-web that referenced this issue Jan 18, 2015
Also add some basic tests around the omniauth login stuff.

Related to case-insensitive logins:
18F/api.data.gov#170

Related to GitHub issues:
NREL/api-umbrella#46
NREL/api-umbrella#88
@GUI
Copy link
Member

GUI commented Jan 19, 2015

There was a bug in our GitHub authentication handling. It's now fixed in master of api-umbrella-web. This will be part of our next package release (version 0.7), but that's not yet scheduled. If you'd like the fixed now, you can deploy the api-umbrella-web component from master. See Deploying From Git for further details.

@GUI GUI added this to the v0.7 milestone Jan 19, 2015
@GUI
Copy link
Member

GUI commented Jan 21, 2015

Since this should be fixed in master, I'm going to go ahead and close this, so we can keep better track of which issues are resolved or not in our milestones.

@GUI GUI closed this as completed Jan 21, 2015
@brylie
Copy link
Contributor Author

brylie commented Jan 21, 2015

Thanks GUI! :)

@GUI
Copy link
Member

GUI commented Feb 10, 2015

FYI: This fix is included in the new v0.7 packages (along with other good stuff). Thanks for brining this to our attention!

@brylie
Copy link
Contributor Author

brylie commented Oct 26, 2015

@GUI, when will this fix be released? We are still experiencing of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants