Closed deepbodra97 closed 6 years ago
try to set Callback URL Locked
to 'No' in your twitter app settings
Thanks a lot! You made my day.Was stuck on this since days.
This issue seems to be happening again for at least a couple of us https://stackoverflow.com/questions/50826742/omniauth-twitter-with-rails-5-stopped-working-oauthunauthorized-403-forbidden not locking the url does not work. I have added the second callback url as recommended in the answers but no luck either.
For now what I've fixed is:
https://mysitecom/auth/twitter/callback
https://mysitecom
http://127.0.0.1:3000/auth/twitter/callback
http://127.0.0.1:3000/
Worked on production, still error on local, now how do I dev @@
@truongnmt - thanks for sharing. I tried your settings for my site, but neither production or dev can "Sign in with Twitter". Existing user tokens are fine and still working OK, just can't sign in with twitter. I wonder if there is something on the Twitter side that's broken or if there is a gem issue as some people do seem to have it working.
Same here, fixed it by adding https://mysite.com/auth/twitter/callback
.
@richhollis So I finally resolved on my dev env by adding
http://localhost:3000/auth/twitter/callback
Update: May 2021
Localhost and 127.0.0.1 were not working for me. What worked for me was using http://lvh.me. It redirects requests to your local host. If your app is running on 3000
port http://lvh.me:3000
should redirect to localhost:3000
For this to work in development.rb
add http://lvh.me
as allowed host
config.hosts << "lvh.me"
And configure your app with a callback URL like http://lvh.me:3000/your/callback/url
in Twitter app settings.
Now browse your website using the address http://lvh.me:3000
and try logging in with Twitter.
allright prithvi16. Thanks.
I am trying to implement Oauth Twitter using Devise. 1)I have created app on twitter 2)I have set callback url to: http://localhost:3000 3)I have added this to config\initializers\devise.rb
config.omniauth :twitter, "key", "key secret"
Sign in with Twitter automatically appears at this route: /users/sign_up/ But on clicking it I get this error
I have ensured that the key and key secret are correct I also tried deleting and creating new app
I cannot get it fixed
Help would be greatly appreciated!
Screenshot of the error.