Usually, Google OAuth2.0 mechanism is working great.
I had the same problem with this error:
The redirect URI in the request, does not match the ones authorized for the OAuth client.
But found this very simple solution by abhishek77in here:
https://coderwall.com/p/fmr5ag/avoid-invalid-credentials-with-google-oauth2
The solution is:
If you are using https://github.com/zquestz/omniauth-google-oauth2 make sure to follow the note in README. "You must enable the "Contacts API" and "Google+ API" via the Google API console."
Enabling these in the Google API console fixed the "Invalid credentials" problem for me.