Devise Oauth Twitter:OAuth ::未经授权禁止403 [英] Devise Oauth Twitter: OAuth::Unauthorized Forbidden 403

查看:71
本文介绍了Devise Oauth Twitter:OAuth ::未经授权禁止403的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Devise实现Oauth Twitter.
我已经在Twitter上创建了应用程序
我已将回调URL设置为: http://localhost:3000
我已经将此添加到config \ initializers \ devise.rb

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"

使用Twitter登录会自动出现在以下路径:/users/sign_up/ 但是点击它会出现这个错误

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.

我无法解决

我们将不胜感激

此处表示需要设置https. 因此,我按照进行了设置.但是出现相同的错误

Here it says that https needs to be setup. So I followed This to set it up. But getting the same error

推荐答案

事实证明,在Twitter应用程序设置中,回调URL锁定默认情况下设置为.将其切换为可修复该错误.

Turns out that in twitter app settings Callback URL Lock was set to Yes by default. Switching it to No fixed the error.

感谢kubido帮助我解决了github上的问题

这篇关于Devise Oauth Twitter:OAuth ::未经授权禁止403的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆