-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Configured verbatim, devise_token_auth receives this error google only #282
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
Comments
I'm getting the exact same error with After authentication and receiving the Looking forward to get this resolved, thanks for such a great gem! |
I get the same error, but only after deviating from the documentation and adding the following code to my devise.rb:
If I do not add the code to this file and follow the documentation only adding my keys to the omniauth.rb I get: invalid_credentials. However if I check the login status on the frontend with:
I get a success message. So despite getting the invalid_credentials message the login seems to be successful. Of course no user is created at the backend. I am using a single page Angular application (own domain) in combination with the rails API backend (Heroku). Does anyone know what the problem might be? Many thanks in advance! |
Hello, same problem as @jancel when i try to cancel manually the omniauth authentication. I do not have the problem when I accept the omniauth authentication. here is my logs Started GET "/api_v2/auth/linkedin?auth_origin_url=http%3A%2F%2Flocalhost%3A3000%2Ffr%2Flogin&omniauth_window_type=newWindow" for ::1 at 2015-12-22 11:39:13 +0100
Started GET "/omniauth/linkedin?auth_origin_url=http%3A%2F%2Flocalhost%3A3000%2Ffr%2Flogin&omniauth_window_type=newWindow&resource_class=Identity" for ::1 at 2015-12-22 11:39:13 +0100
I, [2015-12-22T11:39:14.110470 #2803] INFO -- omniauth: (linkedin) Request phase initiated.
Started GET "/omniauth/linkedin/callback?auth_origin_url=http%3A%2F%2Flocalhost%3A3000%2Ffr%2Flogin&omniauth_window_type=newWindow&resource_class=Identity&oauth_problem=user_refused" for ::1 at 2015-12-22 11:39:16 +0100
I, [2015-12-22T11:39:16.881049 #2803] INFO -- omniauth: (linkedin) Callback phase initiated.
E, [2015-12-22T11:39:17.052539 #2803] ERROR -- omniauth: (linkedin) Authentication failure! invalid_credentials: OAuth::Problem, parameter_absent
Processing by Devise::OmniauthCallbacksController#failure as HTML
Parameters: {"auth_origin_url"=>"http://localhost:3000/fr/login", "omniauth_window_type"=>"newWindow", "resource_class"=>"Identity", "oauth_problem"=>"user_refused"}
Redirected to http://localhost:3000/api_v2/auth/sign_in
Completed 302 Found in 2ms (ActiveRecord: 0.0ms)
Started GET "/api_v2/auth/sign_in" for ::1 at 2015-12-22 11:39:17 +0100
Processing by APIV2::SessionsController#new as JSON
Completed 405 Method Not Allowed in 2ms (Views: 0.2ms | ActiveRecord: 0.0ms) As we can see, Devise is taking the lead and redirect to OmniAuth.config.on_failure = Proc.new { |env| APIV2::OmniauthCallbacksController.action(:omniauth_failure).call(env) } but still no success. Any ideas? |
I think that I've found a possible solution. After some research, that appears to be a facebook error. After debugging the app and devise, I figured out that I'm having this error: "error":{"message":"This IP can't make requests for that application.","type":"OAuthException" |
Try using this gem combination: |
In case it helps someone else, rails logs contained the hint:
That led me to omniauth/omniauth-oauth2#58 |
Had the same problem. I've been searching for hours. I found the redirect_to_failure code here was never called.
|
Seems like @KRaymundus has a possible answer here with little activity since then, so I'll be closing this for now. |
I have configured everything (devise_token_auth, ng-token-auth) and when I configure google, it sends me off, I issue permissions and get this error on the return trip.
More information. I'm using google_oauth2.
Here are my logs (this is just after allowing google access).
The text was updated successfully, but these errors were encountered: