Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5940697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:00:17+00:00 2026-05-22T16:00:17+00:00

I’m using Devise 1.3.4 for authentication for the backend in my app. For a

  • 0

I’m using Devise 1.3.4 for authentication for the backend in my app.
For a couple of days now I cannot log in anymore.
What happens is:

  • I go to the login page /admin/sign_in
  • Log in with good credentials
  • See in the log that the login worked (last_sign_in_at, current_sign_in_at and current_sign_in_ip are set, sign_in_count is increased)
  • Devise sessions controller tries to forward me to the after_sign_in_path_for I specified in my application controller (Admin::DashboardsController#show)
  • Then suddenly the sign in page is rendered again. No redirect, no nothing.

I checked the before_filters and it definitely is Devise’s autorize_admin_user! filter that causes the problems (filters before it are called, filters after it are not called). Meaning that even after logging in successfully it doesn’t recognize me as logged in.

I realize that it is hard to come up with a solution without seeing most of my code.
So my first question would be:

How can I debug this error?
How can I retrace where exactly the login doesn’t work? Do I have to dig in to Warden?
Can it be a session/cookie problem? How could I debug that?

All ideas appreciated!

This is what the log says:

Started GET "/admin/sign_in" for 127.0.0.1 at 2011-05-20 13:49:11 +0200
[Barista] Compiling all scripts for barista
[Barista] Compiling all coffeescripts
  Processing by Admin::SessionsController#new as HTML
Rendered admin/shared/_header.html.haml (3.1ms)
Rendered admin/shared/_menu.html.haml (1.7ms)
Rendered admin/sessions/new.html.haml within layouts/admin (128.7ms)
Completed 200 OK in 171ms (Views: 133.0ms | ActiveRecord: 0.0ms)


Started POST "/admin/sign_in" for 127.0.0.1 at 2011-05-20 13:49:15 +0200
[Barista] Compiling all scripts for barista
[Barista] Compiling all coffeescripts
  Processing by Admin::SessionsController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"VLjjo6W+sd7yRH3SRSNpUN3L8a+OaOgCUpJgB5VaGEM=", "admin_user"=>{"email"=>"my@email.com", "password"=>"[FILTERED]", "remember_me"=>"0"}, "commit"=>"Sign in"}
  AdminUser Load (0.7ms)  SELECT `admin_users`.* FROM `admin_users` WHERE `admin_users`.`email` = 'admin3@gmail.com' LIMIT 1
  SQL (0.2ms)  BEGIN
  AREL (0.3ms)  UPDATE `admin_users` SET `last_sign_in_at` = '2011-05-20 11:49:15', `current_sign_in_at` = '2011-05-20 11:49:15', `current_sign_in_ip` = '127.0.0.1', `sign_in_count` = 3, `updated_at` = '2011-05-20 11:49:15' WHERE `admin_users`.`id` = 33
  SQL (0.5ms)  COMMIT
Redirected to http://myapp.dev/admin
Completed 302 Found in 160ms


Started GET "/admin" for 127.0.0.1 at 2011-05-20 13:49:15 +0200
[Barista] Compiling all scripts for barista
[Barista] Compiling all coffeescripts
  Processing by Admin::DashboardsController#show as HTML
Completed   in 26ms


Started GET "/admin/sign_in" for 127.0.0.1 at 2011-05-20 13:49:16 +0200
[Barista] Compiling all scripts for barista
[Barista] Compiling all coffeescripts
  Processing by Admin::SessionsController#new as HTML
Rendered admin/shared/_header.html.haml (3.5ms)
Rendered admin/shared/_menu.html.haml (2.0ms)
Rendered admin/sessions/new.html.haml within layouts/admin (134.9ms)
Completed 200 OK in 182ms (Views: 139.2ms | ActiveRecord: 0.0ms)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T16:00:18+00:00Added an answer on May 22, 2026 at 4:00 pm

    Okay, after 2 days of fumbling around I finally found the answer.

    Another error appeared simultaneously but first I didn’t make a connection.
    The error was that when a user wanted to log out, Devise tried to delete a session cookie and used the configuration for my session store to find out where my app stores session cookies.
    Now I use a “app config” like this and redis-store for my sessions. My session store configuration looked like this

    MyApp::Application.config.session_store :redis_session_store, AppConfig.redis
    

    AppConfig.redis looks something like

    { :port => 123, :namespace => 'foo' }
    

    Problem with this is that AppConfig.redis is a ActiveSupport::HashWithIndifferentAccess, not a Hash. At some point someone tries to call symbolize_keys! on it and it fails because ActiveSupport::HashWithIndifferentAccess doesn’t have that method.

    Long story short: I changed AppConfig.redis to AppConfig.redis.to_hash and everything started working again. The problem that prevented me from logging in apparently was that a session cookie for my user still existed. (Or does anybody have a better explanation?). Still weird that Devise doesn’t either throw a proper exception or just overwrites the sessions cookie.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
In order to apply a triggered animation to all ToolTip s in my app,
Seemingly simple, but I cannot find anything relevant on the web. What is the
I want use html5's new tag to play a wav file (currently only supported
I want to count how many characters a certain string has in PHP, but
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
Does anyone know how can I replace this 2 symbol below from the string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.