-
Notifications
You must be signed in to change notification settings - Fork 414
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
No route matches [GET] "/auth/google" #10
Comments
The route is /auth/google_oauth2 =) |
Closing, just a small syntax issue =) |
Many thanks! this works, now I have different error, but at least not this one :D Could you help with this too :), although I'm using the "OAuth consumer key" and "OAuth consumer secret" by pasting them explicitly on the initializing file, I get the 400 OAuth 2.0 error: invalid_client. any idea? Thanks! |
Can you paste your code snippet? Just tokenize the real values so I can see exactly how you inserted them? Also you set everything up at http://code.google.com/apis/console? |
Thanks for replying Initializer: Rails.application.config.middleware.use OmniAuth::Builder do Do I have to set things up there? I used omniAuth + Devise + openID before without setting anything up there? I mean what if I only want people to verify who they are on google to use my web application? do I still have to do this? By the way, does this means that I can't use localhost for my application too? |
Ok, my mistake, it's right, the cilent id is wrong, I got it working now. by got it working that means I see the authorization page, and when I allow the application, I get different error now: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed but I will figure it out. I'm really thankful for your guidance! |
That is actually just a cert error for the httpclient. You can address this by either turning off validation, or making sure the certs are available. To turn off validation just use: OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE |
Man, you are the best!!! this works now :D, how do I make sure that certs are available? assuming in real life application I have to do so for better security. |
There are a few ways to fix this. Here's a thread on stackoverflow. Another blog offering a decent solution: http://www.rubyinside.com/how-to-cure-nethttps-risky-default-https-behavior-4010.html This is also useful: http://stackoverflow.com/questions/3977303/omniauth-facebook-certificate-verify-failed To fix directly in your provider line, just use the following and make sure the certs are there. provider :google_oauth2, KEY, SECRET, {:client_options => {:ssl => {:ca_path => "/etc/ssl/certs"}}} |
Addendum on a different invalid_client issue I ran into. I have multiple client IDs setup in the Google API console. A short one like "555555555555.apps.googleusercontent.com" And a longer one that has a hash appended to the original, like: "555555555555-xxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com" The short one works; the longer ones do not. I couldn't find anything in their docs about this, and am not sure what the difference is. Hope this helps someone else |
Hi,
I hope it's the right place to talk about this. I need to this to work urgently (sorry for using that word)
I have a rails 3.1 application on ruby 1.9.3, I followed the example application here, and I also followed the railscasts one, but when I try to log in by calling /auth/google I get this error
No route matches [GET] "/auth/google"
I'm lost, since I use OmniAuth + openid + devise (3.1/1.9.3) in another application and it works, so I know there is nothing wrong with the service or accounts.
Please help.
The text was updated successfully, but these errors were encountered: