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 959809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T01:05:01+00:00 2026-05-16T01:05:01+00:00

I’m slightly puzzled with what should log out a user. At the moment I

  • 0

I’m slightly puzzled with what should log out a user.

At the moment I have a session timeout set to 20 minutes and I thought that once the session expires the user should be logged out.

I can add a code that will do that on a session_end.

I came across a form authentication timeout in a web.config. Currently it’s set to 48 hours.

I have changed the authentication timeout to 20 minutes and that’s doing the job.

So should a session time out log out the user or should this be done by a form authentication time out?

Thank you

Edit:

What I’m facing at the moment, is that session variables get set to 0, which is fine because the session has timed out. But I would have thought that the user will be logged out too.

Am I correct to say that authentication data is always stored in the cookies and that cookie will be cleared only once I hit the form authentication timeout?

Therefore what I’m facing is expected behaviour. User losses session but he’s still logged in because the authentication information is stored in the cookie.

In that case I can set session timeout to be exactly the same as the form authentication time out. Assumption here is that form authentication timeout gets refreshed when the user does anything on the website.

Another alternative is to add code into sesseion_end method where I will log the user out.

Edit 2:

Does an authentication timeout gets refreshed at the same time as a session time out?

Edit 3:

Came across this “Sliding expiration resets an active authentication cookie’s time to expiration upon each request during a single session.” which I believe is what I’m trying to achieve. If the session and the authentication timeout are the same than the authentication timeout will be reset each time a session timeout is reset and this should do the job. Any feedback is welcome…

  • 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-16T01:05:02+00:00Added an answer on May 16, 2026 at 1:05 am

    I think it depends on the nature of your web application. Most regular websites (eg. StackOverflow) do not log a user out when the session ends. However, with security critical websites (ie. banks) the login state of the user is dependent on the session, which is usually reduced to just a few minutes.

    By the sounds of it your web form is dependent on the user being logged in and if that is solely dependent on the session then you will need to ping the server to keep the session alive.

    Unless the form is requesting secure/personal information then I wouldn’t impose a short time limit on its completion. It wouldn’t have been the first time I’ve half completed a form, gone to bed and finished it in the morning!

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I have this code to decode numeric html entities to the UTF8 equivalent character.

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.