I am using devise and omniauth for authentication. Wherever i click on the facebook login button i get this warning msg. ****************************************** warning: peer certificate won''t be verified in this SSL session ****************************************** But now i get this error msg ***************************************** OpenSSL::SSL::SSLError SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed **************************************** What am i doing wrong? -------------- Routes.rb -------------- get "/auth/:provider/callback" => "authentications#create" ---------------------------------------- In my config/initializers/omniauth.rb ----------------------------------------- Rails.application.config.middleware.use OmniAuth::Builder do provider :twitter, ''xxxx'', ''xxxx'' provider :facebook, ''appid'', ''appsecret'', {:scope=>''publish_stream,email''} end ------------------------------------- In my authentications controller ------------------------------------- def create omniauth = request.env["omniauth.auth"] #search if user has been authenticated and application has been authorised authenticate Authentication.find_by_provider_and_uid(params[''provider''], omniauth[''uid'']) #if user has signed in with that provider before, sign user in and show the requested page if authenticate sign_in_and_redirect(:user, authenticate.user) flash[:notice] = "Authentication successful!!" #create new user else user = User.new user.apply_omniauth(omniauth) case omniauth[''provider''] when ''facebook'' if user.save user.profile = Profile.new user.profile.picture_url "https://graph.facebook.com/"+omniauth[''uid'']+"/picture" # user.profile.location omniauth[''extra''][''user_hash''][''location''][''name''] # user.profile.gender = omniauth[''extra''][''user_hash''][''gender''] #save users profile if user.profile.save flash[:notice] = "Signed in with "+omniauth[''provider''] #sign user in sign_in_and_redirect(:user, user) end else redirect_to root_url, :notice => "Authentication failed, please try again!" end when ''twitter'' session[:omniauth] = omniauth.except(''extra'') redirect_to "#{root_url}confirm-email" end end #close of if statement end #close of method ---------------------------------------- In models/user --------------------------------------- def apply_omniauth(omniauth) case omniauth[''provider''] when ''facebook'' self.email = omniauth[''user_info''][''email''] end self.username = omniauth[''user_info''][''nickname''] if username.blank? self.name = omniauth[''user_info''][''name''] if name.blank? authentications.build(:provider=>omniauth[''provider''], :uid=>omniauth[''uid''], :token =>(omniauth[''credentials''][''token''] rescue nil)) end ------------------------------- Please is there anything am doing wrong. Because it was working perfectly locally and even on my heroku host until it started giving me this error message -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
My Application stack trace ------------------------------------- /usr/lib/ruby/1.8/net/http.rb:586:in `connect'' /usr/lib/ruby/1.8/net/http.rb:586:in `connect'' /usr/lib/ruby/1.8/net/http.rb:553:in `do_start'' /usr/lib/ruby/1.8/net/http.rb:542:in `start'' /usr/lib/ruby/1.8/net/http.rb:1035:in `__request__'' rest-client (1.6.1) lib/restclient/net_http_ext.rb:17:in `request'' /usr/lib/ruby/1.8/net/http.rb:772:in `get'' faraday (0.6.1) lib/faraday/adapter/net_http.rb:49:in `call'' faraday (0.6.1) lib/faraday/request/url_encoded.rb:14:in `call'' faraday (0.6.1) lib/faraday/request.rb:88:in `run'' faraday (0.6.1) lib/faraday/request.rb:28:in `run'' faraday (0.6.1) lib/faraday/connection.rb:170:in `run_request'' oauth2 (0.3.0) lib/oauth2/client.rb:56:in `request'' oauth2 (0.3.0) lib/oauth2/strategy/web_server.rb:15:in `get_access_token'' oa-oauth (0.2.2) lib/omniauth/strategies/oauth2.rb:87:in `build_access_token'' oa-oauth (0.2.2) lib/omniauth/strategies/facebook.rb:31:in `build_access_token'' oa-oauth (0.2.2) lib/omniauth/strategies/oauth2.rb:66:in `callback_phase'' oa-core (0.2.2) lib/omniauth/strategy.rb:54:in `call!'' oa-core (0.2.2) lib/omniauth/strategy.rb:26:in `call'' oa-core (0.2.2) lib/omniauth/strategy.rb:59:in `call!'' oa-core (0.2.2) lib/omniauth/strategy.rb:26:in `call'' oa-core (0.2.2) lib/omniauth/builder.rb:30:in `call'' warden (1.0.3) lib/warden/manager.rb:35:in `call'' warden (1.0.3) lib/warden/manager.rb:34:in `catch'' warden (1.0.3) lib/warden/manager.rb:34:in `call'' actionpack (3.0.3) lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'' actionpack (3.0.3) lib/action_dispatch/middleware/head.rb:14:in `call'' rack (1.2.2) lib/rack/methodoverride.rb:24:in `call'' actionpack (3.0.3) lib/action_dispatch/middleware/params_parser.rb:21:in `call'' actionpack (3.0.3) lib/action_dispatch/middleware/flash.rb:182:in `call'' actionpack (3.0.3) lib/action_dispatch/middleware/session/abstract_store.rb:149:in `call'' actionpack (3.0.3) lib/action_dispatch/middleware/cookies.rb:295:in `call'' activerecord (3.0.3) lib/active_record/query_cache.rb:32:in `call'' activerecord (3.0.3) lib/active_record/connection_adapters/abstract/query_cache.rb:28:in `cache'' activerecord (3.0.3) lib/active_record/query_cache.rb:12:in `cache'' activerecord (3.0.3) lib/active_record/query_cache.rb:31:in `call'' activerecord (3.0.3) lib/active_record/connection_adapters/abstract/connection_pool.rb:353:in `call'' actionpack (3.0.3) lib/action_dispatch/middleware/callbacks.rb:46:in `call'' activesupport (3.0.3) lib/active_support/callbacks.rb:415:in `_run_call_callbacks'' actionpack (3.0.3) lib/action_dispatch/middleware/callbacks.rb:44:in `call'' rack (1.2.2) lib/rack/sendfile.rb:107:in `call'' actionpack (3.0.3) lib/action_dispatch/middleware/remote_ip.rb:48:in `call'' actionpack (3.0.3) lib/action_dispatch/middleware/show_exceptions.rb:46:in `call'' railties (3.0.3) lib/rails/rack/logger.rb:13:in `call'' rack (1.2.2) lib/rack/runtime.rb:17:in `call'' activesupport (3.0.3) lib/active_support/cache/strategy/local_cache.rb:72:in `call'' rack (1.2.2) lib/rack/lock.rb:11:in `call'' rack (1.2.2) lib/rack/lock.rb:11:in `synchronize'' rack (1.2.2) lib/rack/lock.rb:11:in `call'' actionpack (3.0.3) lib/action_dispatch/middleware/static.rb:30:in `call'' railties (3.0.3) lib/rails/application.rb:168:in `call'' railties (3.0.3) lib/rails/application.rb:77:in `send'' railties (3.0.3) lib/rails/application.rb:77:in `method_missing'' passenger (3.0.0) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'' passenger (3.0.0) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'' passenger (3.0.0) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'' passenger (3.0.0) lib/phusion_passenger/rack/application_spawner.rb:205:in `start_request_handler'' passenger (3.0.0) lib/phusion_passenger/rack/application_spawner.rb:170:in `send'' passenger (3.0.0) lib/phusion_passenger/rack/application_spawner.rb:170:in `handle_spawn_application'' passenger (3.0.0) lib/phusion_passenger/utils.rb:479:in `safe_fork'' passenger (3.0.0) lib/phusion_passenger/rack/application_spawner.rb:165:in `handle_spawn_application'' passenger (3.0.0) lib/phusion_passenger/abstract_server.rb:357:in `__send__'' passenger (3.0.0) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'' passenger (3.0.0) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'' passenger (3.0.0) lib/phusion_passenger/abstract_server.rb:180:in `start'' passenger (3.0.0) lib/phusion_passenger/rack/application_spawner.rb:128:in `start'' passenger (3.0.0) lib/phusion_passenger/spawn_manager.rb:253:in `spawn_rack_application'' passenger (3.0.0) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'' passenger (3.0.0) lib/phusion_passenger/spawn_manager.rb:246:in `spawn_rack_application'' passenger (3.0.0) lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'' passenger (3.0.0) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'' passenger (3.0.0) lib/phusion_passenger/spawn_manager.rb:244:in `spawn_rack_application'' passenger (3.0.0) lib/phusion_passenger/spawn_manager.rb:137:in `spawn_application'' passenger (3.0.0) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'' passenger (3.0.0) lib/phusion_passenger/abstract_server.rb:357:in `__send__'' passenger (3.0.0) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'' passenger (3.0.0) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'' passenger (3.0.0) helper-scripts/passenger-spawn-server:99 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Maybe Matching Threads
- request.format = :mobile causes error "undefined method `ref' for nil:NilClass"
- Rails 3 Errno::EAFNOSUPPORT: Address family not supported by protocol - socket(2)
- Rails 3 Errno::EAFNOSUPPORT: Address family not supported by protocol - socket(2)
- [Puppet Upgrade] Puppet agent does not work
- internal server error(500) when attempting to sendmail