Web Connection
Allow re-defining the Authenticate() session cookie expiration date
Gravatar is a globally recognized avatar based on your email address. Allow re-defining the Authenticate() session cookie expiration date
  Mike McDonald
  All
  Jan 20, 2019 @ 10:20pm

Rick -

Within the wwProcess::Authenticate() method, there is the following code..

IF Request.IsChecked("WebLogin_chkRememberMe")
    *** Keep the cookie around
    THIS.oResponse.AddCookie(this.cSessionKey,Session.cSessionId,"/",MimeDateTime(DATE() + 5))	
ENDIF

It would be useful if the default of 5 days for the cookie expiration date could be #DEFINE'd in wconnect.h so it could easily be re-defined.

- Mike McDonald

Gravatar is a globally recognized avatar based on your email address. re: Allow re-defining the Authenticate() session cookie expiration date
  Rick Strahl
  Mike McDonald
  Jan 22, 2019 @ 03:33pm

Ok, finally had some time to look at this. Added wwProcess::nAuthenticationTimeoutMinutes which allows you to specify the timeout in minutes.

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Allow re-defining the Authenticate() session cookie expiration date
  Mike McDonald
  Rick Strahl
  Jan 24, 2019 @ 05:33pm

Rick -

Added wwProcess::nAuthenticationTimeoutMinutes which allows you to specify the timeout in minutes.

Thanks for the new property. That will help me with a small personal project I'm converting to use all SQL data, as well as implementing the MVC pattern.

What is the cookie timeout for the Message Board? I had to Sign In today even though I last posted on January 21st and I last visited the support.west-wind.com site on the 22nd.

I guess the cookie expiration date doesn't update just by posting or visiting the site. I find that I have to Sign In frequently, even though I'm checking the board fairly often.

- Mike McDonald

Gravatar is a globally recognized avatar based on your email address. re: Allow re-defining the Authenticate() session cookie expiration date
  Marcel DESMET
  Mike McDonald
  Jan 25, 2019 @ 12:20am

Hello, my 2 cents .. cookies are linked to the browser

Gravatar is a globally recognized avatar based on your email address. re: Allow re-defining the Authenticate() session cookie expiration date
  Rick Strahl
  Mike McDonald
  Jan 25, 2019 @ 12:34am

The cookie is good for 7 days. No rolling renewals so after 7 days you'll have to log back in. I bumped this to 15 days because I see it also and it bugs me from time to time too.

As Marcel says if you use different browsers - especially two Chromium browsers (I use Brave and Chrome interchangeably a lot) - I think the cookies are specific to each. In my case I probably sometimes log in with Chrome or Brave adn then wonder why the time out is up 😃

+++ Rick ---

Gravatar is a globally recognized avatar based on your email address. re: Allow re-defining the Authenticate() session cookie expiration date
  Mike McDonald
  Rick Strahl
  Jan 28, 2019 @ 07:20pm

Rick -

In wwProcess::Authenticate() there is a SET STEP ON statement.

- Mike McDonald

© 1996-2019