Devise throws 401 unauthorized and redirects to Production / Staging only

I have an authentication system configured with Devise.

I can successfully enter development mode, but I cannot log in with valid credentials in staging / production environment.

Could it be the reason for storing the session?

This is what I have inside config / initializers / session_store.rb:

# Be sure to restart your server when you modify this file.

Rails.application.config.session_store :cookie_store, key: '_pigo_session'

      

I also added config.http_authenticatable = false

to config / intitializers / devise.rb

My staging.log file looks like this:

  I, [2015-06-10T16:57:20.325304 #3577]  INFO -- : Started GET "/" for 69.59.28.19 at 2015-06-10 16:57:20 +0400
  I, [2015-06-10T16:57:20.327106 #3577]  INFO -- : Processing by OffersController#index as HTML
  I, [2015-06-10T16:57:20.328034 #3577]  INFO -- : Filter chain halted as #<Proc:0x007fad7d18c5b8@/home/deploy/apps/pigo/shared/bundle/ruby/2.1.0/gems/actionpack-4.1.4/lib/action_controller/metal/http_authentication.rb:71> rendered or redirected
  I, [2015-06-10T16:57:20.328232 #3577]  INFO -- : Completed 401 Unauthorized in 1ms (ActiveRecord: 0.0ms)

      

+3
ruby-on-rails ruby-on-rails-4 devise


source to share


No one has answered this question yet

See similar questions:

4
Rails - 401 Unauthorized Access to Production Only Action
3
Developing an existing database: 401 Unauthorized using a valid password

or similar:

3
Authenticate with ActionController :: Responder and axlsx_rails gem
2
I am getting an error when trying to go to the backend after installing refinerycms-portfolio
2
RoR Devise user creation
2
Rails 4 + Devise DB Login: NoMethodError 'login' for ActionDispatch :: Request
1
Authorization fails (develops an authentication token)
0
Skip Authentication in Active Control Control Action
0
ActiveRecord :: RecordNotFound - Could not find user with id = in Rails
0
How to authenticate user in Devise from C # program
0
Go to high level pages with simple_token_authentication



All Articles
Loading...
X
Show
Funny
Dev
Pics