Why would logout using devise + omniauth + google-oauth2 + rails work in dev but not in prod -
the logout feature in rails application appears working when run app locally using localhost:3000; however, when logout on production server directing me http://example.com/users/logout , when go http://example.com still logged in.
i pushed changes git repo , both dev / prod both running same source code. not sure why prod box isn't logging user out when click logout link.
development.rb
rails.application.configure # settings specified here take precedence on in config/application.rb. # in development environment application's code reloaded on # every request. slows down response time perfect development # since don't have restart web server when make code changes. config.cache_classes = false # not eager load code on boot. config.eager_load = false # show full error reports , disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false # don't care if mailer can't send. config.action_mailer.raise_delivery_errors = false # print deprecation notices rails logger. config.active_support.deprecation = :log # raise error on page load if there pending migrations. config.active_record.migration_error = :page_load # debug mode disables concatenation , preprocessing of assets. # option may cause significant delays in view rendering large # number of complex assets. config.assets.debug = true # asset digests allow set far-future http expiration dates on assets, # yet still able expire them through digest params. config.assets.digest = true # adds additional error checking when serving assets @ runtime. # checks improperly declared sprockets dependencies. # raises helpful error messages. config.assets.raise_runtime_errors = true # raises error missing translations # config.action_view.raise_on_missing_translations = true end production.rb
rails.application.configure # settings specified here take precedence on in config/application.rb. # general settings config.app_domain = 'example.io' # email config.action_mailer.delivery_method = :smtp config.action_mailer.perform_deliveries = true config.action_mailer.default_url_options = { host: config.app_domain } config.action_mailer.smtp_settings = { address: 'smtp.example.com', port: '587', enable_starttls_auto: true, user_name: 'foo', password: ':)', authentication: :plain, domain: 'example.com' } # code not reloaded between requests. config.cache_classes = true # eager load code on boot. eager loads of rails , # application in memory, allowing both threaded web servers # , relying on copy on write perform better. # rake tasks automatically ignore option performance. config.eager_load = true # full error reports disabled , caching turned on. config.consider_all_requests_local = false config.action_controller.perform_caching = true # enable rack::cache put simple http cache in front of application # add `rack-cache` gemfile before enabling this. # large-scale production use, consider using caching reverse proxy # nginx, varnish or squid. # config.action_dispatch.rack_cache = true # disable serving static files `/public` folder default since # apache or nginx handles this. config.serve_static_files = env['rails_serve_static_files'].present? # compress javascripts , css. config.assets.js_compressor = :uglifier # config.assets.css_compressor = :sass # not fallback assets pipeline if precompiled asset missed. config.assets.compile = false # asset digests allow set far-future http expiration dates on assets, # yet still able expire them through digest params. config.assets.digest = true # `config.assets.precompile` , `config.assets.version` have moved config/initializers/assets.rb # specifies header server uses sending files. # config.action_dispatch.x_sendfile_header = 'x-sendfile' # apache # config.action_dispatch.x_sendfile_header = 'x-accel-redirect' # nginx # force access app on ssl, use strict-transport-security, , use secure cookies. # config.force_ssl = true # use lowest log level ensure availability of diagnostic information # when problems arise. config.log_level = :debug # prepend log lines following tags. # config.log_tags = [ :subdomain, :uuid ] # use different logger distributed setups. # config.logger = activesupport::taggedlogging.new(sysloglogger.new) # use different cache store in production. # config.cache_store = :mem_cache_store # enable serving of images, stylesheets, , javascripts asset server. # config.action_controller.asset_host = 'http://assets.example.com' # ignore bad email addresses , not raise email delivery errors. # set true , configure email server immediate delivery raise delivery errors. # config.action_mailer.raise_delivery_errors = false # enable locale fallbacks i18n (makes lookups locale fall # i18n.default_locale when translation cannot found). config.i18n.fallbacks = true # send deprecation notices registered listeners. config.active_support.deprecation = :notify # use default logging formatter pid , timestamp not suppressed. config.log_formatter = ::logger::formatter.new # not dump schema after migrations. config.active_record.dump_schema_after_migration = false end
the logout behavior appears working now. put //= require jquery_ujs below //= require jquery in application.js file , able logout on prod box. guys.
Comments
Post a Comment