I am trying to implement Oauth Twitter using Devise.
I have created app on twitter
I have set callback url to: http://localhost:3000
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
key and key secret are correct
I also tried deleting and creating new app.
I cannot get it fixed
Help would be greatly appreciated
Here it says that https needs to be setup. So I followed This to set it up. But getting the same error
Turns out that in twitter app settings Callback URL Lock was set to Yes by default. Switching it to No fixed the error.
Thanks to kubido for helping me out to close the issue on github
You can try to add these in the Callback URLs in https://apps.twitter.com/
Worked for me after almost an hour!
I got these URLs after failing the log-in. I checked the request_options. One way to do it is using BetterErrors gem.
您需要将回调网址设置为:“您的网址”/auth/twitter/callback
I am trying to implement Oauth Twitter using Devise.
I have created app on twitter
I have set callback url to: http://localhost:3000
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
key and key secret are correct
I also tried deleting and creating new app.
I cannot get it fixed
Help would be greatly appreciated
Here it says that https needs to be setup. So I followed This to set it up. But getting the same error
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.