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

  • SEARCH
  • Home
  • 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 7588357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:54:06+00:00 2026-05-30T19:54:06+00:00

I have an issue with my login functionality. When user clicks the logout link

  • 0

I have an issue with my login functionality.

  1. When user clicks the logout link eveything works normally, session is destroyed and user can log in as a different user.
  2. If a currently signed in user closes the browser and comes back to the login page, or if the user simply presses the back button to the login page
    and attempts to sign in as a different user, the user is directed to the user previously logged in to the application on that particular browser.
    This is not wanted functionality. I would like to give the user the ability to sign into whatever account they want to regardless of
    whether or not the user backs into the login page, or closes the window and comes back to the login page.

    I have tried 6 different solutions and none of them have worked. It seems that no matter the change I make to the code the login functionality always pulls
    the user id from a session[:warden.user.person.key] hash and uses it to login no matter what is put into the login text field. I have tried to gain control of this process
    but have failed at every attempt.

    I have run out of ideas and need some help for this has been deemed a security hole in our system.
    Please let me kow what else you would like to see for code. I’m giving you the session controller code and my routes.

 
class SessionsController  Devise::SessionsController

  def new
    session["devise.omniauth_data"]=nil
    session[:last_registration_role]=nil
    super
  end
  def create
    if params['person']['remember_me'] == '1'
      cookies.signed['rem'] = {
        :value => params['person']['email'],
        :expires => 1.year.from_now,
        :httponly => true
      }
    end
    super
  end
  def destroy

    session["devise.omniauth_data"]=nil
    session[:last_registration_role]=nil
    super
    reset_session
  end    
end

Routes



                     new_person_session GET      /people/sign_in(.:format)                                                                           {:action=>"new", :controller=>"sessions"}
                                    person_session POST     /people/sign_in(.:format)                                                                           {:action=>"create", :controller=>"sessions"}
                            destroy_person_session GET      /people/sign_out(.:format)                                                                          {:action=>"destroy", :controller=>"sessions"}
                                   person_password POST     /people/password(.:format)                                                                          {:action=>"create", :controller=>"devise/passwords"}
                               new_person_password GET      /people/password/new(.:format)                                                                      {:action=>"new", :controller=>"devise/passwords"}
                              edit_person_password GET      /people/password/edit(.:format)                                                                     {:action=>"edit", :controller=>"devise/passwords"}
                                                   PUT      /people/password(.:format)                                                                          {:action=>"update", :controller=>"devise/passwords"}

  • 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-30T19:54:07+00:00Added an answer on May 30, 2026 at 7:54 pm

    In your application_controller, try setting the exact location you want people to be sent after signing in:

    def after_sign_in_path_for(resource)
      root_path
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an issue with cakephp's login functionality. When I try to login under
I have an issue in my app where the change my password functionality has
i have an issue with url lengths in iis7. If you go to: http://www.somesite.com/myaccount/login.htm?ReturnUrl=aa2Fmyaccounta2FdefaultaaspxadnoaauserSuppliedIdentifierahttpa3Aa2Fa2Faaaaaaamaapenidacoma2Fadnoaareturnatoasigahandleaa7B633942228855348748a7Da7BaRINLQa3Da3Da7DadnoaareturnatoasigaxSa2FFPGusD7UvskGqfkJq4QtEYjc4fSVFoa2F3sXNwCBteGOBJ8mipo7yLsuSk2hEgLogbzn6SthYb0wY3pBQM1OQa3Da3Daopenidaassocahandleaa7BHMACaSHA256a7Da7B4b051c2ba7Da7ddufPa2BAa3Da3Da7Daopenidaclaimedaidahttpa3Aa2Fa2Faaaaaaaaaopbnidacoma2Faopenidaidentityahttpa3Aa2Fa2Faaaaaaaabcpenidacoma2Faopenidamodeaidaresaopenidansahttpa3Aa2Fa2Fspec
In developing my current iPhone application, I'm having issues handling the login, logout functionality
I have an issue where if my user is on the Dashboard screen and
I have a little issue concerning CSRF security and a login form. The form
I have two sites which I use the same cookie for login which works
I have issue that is reproduced on g++. VC++ doesn't meet any problems. So
I have an issue that is driving me a bit nuts: Using a UserProfileManager
We have an issue using the PEAR libraries on Windows from PHP . Pear

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.