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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:53:37+00:00 2026-06-10T02:53:37+00:00

This is a multi-part question , so feel free to give input on any

  • 0

This is a multi-part question, so feel free to give input on any one of the parts, but since I can only accept one answer, I will accept the most complete answer in relation to all that is being asked. I will upvote partial answers if they are relevant and useful.

First, a little background, without going TL;DR on the question: I am using Quake Framework (yes, it’s mine) for this project – to quickly describe it, it uses CodeIgniter and jQuery 1.8.0 mainly (among others, but they are irrelevant for the question.) It also includes the Total Storage jQuery plugin (for local storage) and jQuery Cookies as a fallback for browsers that don’t support local storage.

Part 1:

I have built a user authentication system. The login has a “remember me” feature (which is not yet functional) – what is the best way to store the user’s data? Some thoughts:

  • Store the username and sha1’d password in local storage/cookie. This seems to me to be a possibly insecure option, but I’m unsure.
  • Store some kind of hash (maybe PHP’s com_create_guid()?) in the localstorage/cookie as well as in the database (maybe along with a date for expiry?)

Part 2:

After implementation of the “remember me” feature, what is the best way to finish implementing it? Should I have every page check for the cookie (because the user could initially hit any page and would need re-logged?) While each page of course needs to check the session, and once they are re-logged by the cookie/local storage, they will get a regular session, it seems very redundant to check for both a session and a cookie on each page (we’d of course first check for a session so that we don’t check cookies of logged-in users repeatedly, and then check for the cookie if there’s no session, but still.) Is there a better way?

  • 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-10T02:53:38+00:00Added an answer on June 10, 2026 at 2:53 am

    Part 1

    It would be best to generate a random token(hash you mentioned) in the server, and save it both in the DB and cookie. Making it random will prevent others from “guessing” or generating your token. Using a GUID would be your best option.

    Part 2

    In each page, you can check if a session exists. If no session is available, check for your auth cookie. If auth cookie is available, trigger your auth-check code. That way, you only need to check the auth cookie when user is not logged in already.

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

Sidebar

Related Questions

Firstly, as this is essentially a multi-disciplinary question, please feel free to submit answers
This is probably a multi-part question. Background: we have a native (c++) library that
My question is, how can do I take this Multi Dim array collection and
This is a multi-part question. I have a table similar to: CREATE TABLE sales_data
I have a multi-part, possibly confusing question... it's been a while since I've dug
I think this is a multi-part question, so bear with me. Currently all of
This is a multi part question. Background: I'm building my first site using CakePHP,
In this question: If a form field has multi validators, how to let play
This question nags me for a while but I did not found complete answer
I have a multi part question for a php script file. I am creating

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.