I’m currently working on a website where, once logged in, the user has certain privileges, like downloading certain files, editing DB, etc.
Once the username and password has been confirmed (using JS fetch and checking a PHPMyAdmin DB), I’m using JS localStorage to let the Navigator know that the user has those privileges, and I’m openning a PHP Session for that user. The question is the following:
Is the localStorage enough or should I check the PHP session through fetch every time the user does any relevant changes to the DB? How would you handle this situation?