[英]devise + omniauth auth/failure?message=invalid_credentials
after i added an application in twitter when i request for an authentication in twitter (/auth/twitter) i get these error message 当我在Twitter(/ auth / twitter)中请求身份验证时,在Twitter中添加了一个应用程序后,出现这些错误消息
http://localhost:3000/auth/failure?message=invalid_credentials http:// localhost:3000 / auth / failure?message = invalid_credentials
Routing Error
No route matches "/auth/failure"
how can i add a valid credential or is there any ssl certificate that must be included in requesting for twitter auth?? 我如何添加有效的凭证,或者在请求Twitter身份验证时必须包含任何SSL凭证?
my facebook authentication just works fine after i added a parameter ssl certificate that looks like this 我添加了如下所示的参数ssl证书后,facebook身份验证工作正常
Rails.application.config.middleware.use OmniAuth::Builder do
provider :facebook,'xxx', 'xx', { :scope => 'publish_stream,offline_access,email',:client_options => { :ssl =>{ :ca_path => "/etc/ssl/certs" } }}
provider :twitter, 'xx','xxx' #,{ :client_options => { :ssl =>{ :ca_path => "/etc/ssl/certs" } }}
end
i've same problem with you, it happen because oauth_token in twitter login only valid on once request. 我和你有同样的问题,这是因为Twitter登录中的oauth_token仅在一次请求时有效。 May be your application trying to refresh when authentication to twitter.
可能是您的应用程序尝试对Twitter进行身份验证时刷新。
when i've problem like you, my apps trying to refresh the webpage with 当我遇到像您这样的问题时,我的应用程序尝试使用
window.opener.location = "#{request.fullpath}";
Until now i'couldn't find how to popup a window when login using twitter. 到目前为止,我找不到使用Twitter登录时如何弹出窗口。 I'm using omniauth and rails 3.0.3.
我正在使用omniauth和rails 3.0.3。 Thanks
谢谢
This is all you need 这就是你所需要的
site url http://localhost:3000/
网站网址
http://localhost:3000/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.