omniauth-openid example does not work
I have been using it with no problem some weeks ago, but now it stopped working for some reason.
I tried all kinds of variants (wasted last 3 days), but still no luck.
I keep being redirected to sign_in and getting this in the logs:
Processing by Users::OmniauthCallbacksController#failure as HTML
If I add a 'failure' method and inspect the request.env, I see that there is a 'invalid credentials' error. Google is sending the email and user name, I can see it in the URL and in the file created, but devise/omniauth is not accepting it.
And after that log line, I get this one:
WARNING: Can't verify CSRF token authenticity
You should consider adding more log lines, it is a pain to debug. For instance, for some time I thought there was something wrong with the csrf thing, because it was the first error (WARN). But then I saw that other line before it (INFO), with the word 'failure' (it was hard to see it because of the large URLs), so I realized that something else was going on.
Also, in the examples it uses data["email"], and I think it should be data.email. That's what worked for me before this issue, but now none works.
I deleted Gemfile.lock just in case and run bundle install, so everything should be up to date.
Please let me know how to debug further, this is driving me crazy.
Note: omniauth-facebook works fine
I haven't used devise with openid myself. You will have better luck finding help in devise or omniauth mailing list and stack overflow.
I can confirm being driven crazy by the exact same issue -- and also that the facebook example works fine.
I tried getting rid of the identifier which causes a redirect to enter an OpenID, but no matter what I enter as the ID (yahoo.com, google.com/accounts/o8/id, etc) I get the same failure.
I'm wondering if this might be an issue with the omniauth-openid gem?
It should be easy to write an example using just the omniauth-openid gem and verifying the issue. As I said, Devise is just a very thin layer and (hopefully) isn't introducing any failures in the workflow.
Any news here? Can you provide a way to reproduce the issue? Thanks.
I gave up in frustration and decided to use the google apps oauth gem with the domain gmail.com only. It isn't as robust a solution as OpenID would have been but met my purposes for now.
To repro the issue - create a new project or modify an existing one and follow the instructions outlined in the devise instructions for OpenID with the google provider. Try signing in and you will receive the failure error.
Did the steps above and it worked fine. Closing this since I can't reproduce, thanks!