Kevin Powell - CommunityKP-C
Kevin Powell - Community2y ago
30 replies
MD

Database setup for a simple login and registration page in terms of having a "remember me" function

I'm not sure how to setup my database to have a "Remember me" function in order to handle bypassing login. I know you use a cookie with a encoded string and other stuff but the database setup itself is a bit odd. I'm using a Postgres database and so far here are the fields I thought of...

user_id AUTOINCREMENT INTEGER
email TEXT NOT NULL
password TEXT NOT NULL
date_added DATETIME
is_admin BOOLEAN

I'm thinking I'll need either a separate table for generating a token for a Remember Me function or as an additional field in this User table. Not sure since I've never implemented one before. Any suggestions would be great! Thanks!
Was this page helpful?