dj buen
dj buen

Reputation: 208

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

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??

my facebook authentication just works fine after i added a parameter ssl certificate that looks like this

 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

Upvotes: 1

Views: 2078

Answers (2)

Bernard Banta
Bernard Banta

Reputation: 755

This is all you need

site url http://localhost:3000/

Upvotes: 0

Agung Prasetyo
Agung Prasetyo

Reputation: 4483

i've same problem with you, it happen because oauth_token in twitter login only valid on once request. May be your application trying to refresh when authentication to 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. I'm using omniauth and rails 3.0.3. Thanks

Upvotes: 1

Related Questions