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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:41:12+00:00 2026-06-17T14:41:12+00:00

I have a user database that stores encrypted passwords, and would like to create

  • 0

I have a user database that stores encrypted passwords, and would like to create a “Keep me logged in” cookie. I believe the following method should be secure enough for my purposes, but I would like to hear your thoughts:

  1. If the user selects the “Keep me logged in box” and provides proper credentials, create a cookie that contains a very large random string (call this the beacon). This is also stored in a separate column in the user table.
  2. Each time a user visits the page, search the user table for the beacon cookie. If it doesn’t exist, do nothing. If it does exist, retrieve the user’s information and treat them as logged in.
  3. When the user logs out, or logs in without the box checked, destroy the beacon cookie.

This could be manipulated if someone were to properly guess the beacon string, but my intent is to make it large and random enough that this is very difficult to do.

  • 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-06-17T14:41:14+00:00Added an answer on June 17, 2026 at 2:41 pm

    I presume this is being done in addition to normal session handling as way of recreating the session later.

    There are a few things that can be done to improve security.

    1. Use SSL, makes cookie interception much more difficult.
    2. Regenerate the cookie hash after each use. It should only be valid for one login.
    3. If you store this as 1 cookie to 1 user, it won’t work if the user is on multiple devices (Cookie from first device gets overridden by cookie on second device).
    4. Hash needs to be random, should not incorporate any user data in generation.
    5. User data (email, password in particular) should require a password to change. If the cookie is intercepted, the interceptor wont be able to change data on the account.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a MySQL user added to a database that I would like to
Consider the following scenario We have a simple database that involves two entities: user
I have a database schema that is similar to the following: | User |
I have a table in my database that stores user input as a start
I have some data in my user database that I would prefer to be
I have a database that is being filled by user defined EditTexts. None of
I have another web app, that uses the liferay user database. But before a
I have a user that enters a piece of data into my database and
I have a user Sql Authentication account that has remote access to my database
Let's say I have a user that entered 12 links into the database but

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.