I have signing in with Facebook working. I am now trying to get signing in with Google working.
I get Error: redirect_uri_mismatch and I can't figure out why.
I saw where somebody said to use omniauth-oauth2 v. 1.3.1 so I am.
My routes file includes:
gem 'omniauth-google-oauth2', '~> 0.4.1'
gem 'omniauth-oauth2', '~> 1.3.1'
Rails.application.config.middleware.use OmniAuth::Builder do
provider :facebook, ENV['FACEBOOK_APP_ID'], ENV['FACEBOOK_SECRET'], info_fields: 'email,first_name,last_name'
provider :google_oauth2, ENV["GOOGLE_CLIENT_ID"], ENV["GOOGLE_CLIENT_SECRET"],
:name => "google",
:scope => "email, profile, plus.me, http://gdata.youtube.com",
:prompt => "select_account",
:image_aspect_ratio => "square",
:image_size => 50
The redirect URI in the request, http://localhost:3000/auth/google/callback, does not match the ones authorized for the OAuth client
In console.developers.google.com. Enter your app’s URL plus
in “Authorized redirect URIs field. So It should be: