I have a problem on production with Facebook login which happened today. I'm using Rails omniouth-facebook gem for authentication users via Fb.
So, after some debugging I figure out that uid
which I got in response from Facebook isn't the same as uid
which particular user has stored in database.
I have this part:
find_by(provider: auth.provider, uid: auth.uid)
where auth is env['omniauth.auth']
and when I manually check user with auth.email in my database uids
not matched, so this function always returns nil and Login Failure.
Does anybody has idea what could be the problem? Really would appreciate any hint.
Thanks, Bojan