Well I am sorry to publish such a lame question but I have managed to use omniauth with facebook, twitter and even linkedin, but I am still unable to do it with google omniauth 2.0, I found that the issue is related to the callback URI (I must add that I am testing with a local enviroment [localhost]), so I have tried to change the URI in the following ways
http:127.0.0.1:3000/auth/google_oauth2/callback/
http:127.0.0.1:3000/auth/google_oauth2/callback
https:127.0.0.1:3000/auth/google_oauth2/callback/
https:127.0.0.1:3000/auth/google_oauth2/callback
http:localhost:3000/auth/google_oauth2/callback/
http:localhost:3000/auth/google_oauth2/callback *
https:localhost:3000/auth/google_oauth2/callback/
https:localhost:3000/auth/google_oauth2/callback
so far I have tried with each one individually and none of these worked, it looks like the one marked with a * is the one being returned on my browser, but still receiving
The redirect URI in the request:
http://localhost:3000/auth/google_oauth2/callback did not match a
registered redirect URI
I am therefor looking for an answer on how to perform this authentication or how to set the callback URI properly for a localhost callback. thanks in advance.
BTW: I am using Rails 4 and omniauth, omniauth-google-oauth2 gems BTW2: I have removed the "//" so these won't be treated like links
make sure you make the access type online
config.omniauth :google_oauth2, "[my key]", "[secret]", {access_type: 'online'}
I guess you should use
http://localhost:3000/users/auth/google_oauth2/callback
(you missed users in the middle)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With