Jump to content

[SOLVED] User Auth Question


lalabored

Recommended Posts

Sessions last as long as the browser is open and the user is active. The sessions gets "destroyed" when the user either logs out or they close the browser. That's why it's more secure.

 

However, cookies can last forever if you coded it to. But the problem is, a user (potentially a hacker) can see the cookies that they have easily in their browsers. Also, cookies won't work for the very few people who blocks all cookies.

Link to comment
Share on other sites

If you need permenent login then you may follow this

 

When user login set values in session and persistent cookie.

Use session at all.

Now when user come again to login or session time out fetch the values from cookie and make auto login.

 

If you do not found cookie set then ask to user to login.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.