I am trying to integrate omniauth google oath and while i can log in or create new user through google plus, i get this message when i click login but then disappears at the end of the request.
XMLHttpRequest cannot load https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=924…scope=email+profile&state=7569c82117b4114fa45f63db7a7fe80f2c42232524224f2c.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'http://localhost:3000' is therefore not allowed access.
Also while on localhost i can create or login using google plus despite the error it doesn't work on heroku.
I've searched a lot but even though i added code like below in my application.rb file
headers['Access-Control-Allow-Origin'] = 'http://localhost:3000'
i still can't seem to get it right