0

Possible Duplicate:
#= added to URL by facebook

I have a problem with Omniauth + Facebook. I've done everything exactly as described on this wiki page and when i'll hit 'Login with Facebook' button, omniauth allways redirects me to http://domain/sign_up#_=_, no matter if user exists in database or not (i mean, user with email address downloaded from facebook api).

I'm not sure what code could be usefull for you to debug my problem cause i need to admit that this whole oauth thing seems a bit magicial to me. It's probably something connected to find_for_facebook_oauth() function cause that's the function responsible for checking if user exists in database. However, even looking in it's code, i'm not able to see what's the problem.

Can you please tell me what can be a cause or just advice me what files or functions you need to check out to be able to tell more?


I'm not sure why this question is marked as a duplicate and closed. Have you even read the question body or just a title?

Community
  • 1
  • 1
mbajur
  • 4,406
  • 5
  • 49
  • 79
  • There is something known as Google :) http://goo.gl/QVwQC – Mohit Jain Sep 28 '12 at 20:28
  • No, that's not my issue. My problem is not that i don't like the fact that facebook adds #_=_ to my url, it's that facebook login doesn't work at all. I just described everything i could to give you any possible clues (including the url where facebook redirects me) – mbajur Sep 28 '12 at 20:32
  • Oh i m sorry.. Try checking what errors user object has..@user.errors should have errors. – Mohit Jain Sep 28 '12 at 20:34
  • well, i've checked what errors does `@user.errors` have inside (in `omniauth_callbacks` controller, just before `if @user.persisted?` line) and the error is: `email has already been taken` ... which seems a bit strange to me, shouldn't omniauth connect my existing account in such situation ? – mbajur Sep 28 '12 at 20:48
  • 1
    No because oumniauth by default just match provider and uid. Nothing else.. – Mohit Jain Sep 28 '12 at 20:59
  • oh, so it looks like i've misunderstood how omniauth works. Thanks you for cleaning that up for me :) – mbajur Sep 28 '12 at 21:02

0 Answers0