Boy van Amstel

Technology, programming and 80's hits.

Omniauth + Facebook = OpenSSL::SSL::SSLError

I’ve run into this issue twice and now I’m writing down the solution. When authenticating with Facebook via Omniauth, my server always fails with the following error:

OpenSSL::SSL::SSLError (SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed):

This is easily fixed by adding the following to one of the initializers:


It’s probably not the best solution, as this turns off SSL peer verification..

A better solution:

Like what you're reading, want to give me feedback or share your views? Let me know on Twitter.