Multiple choice technology security

The usage of setRememberToken is

  1. Generally recommended

  2. Generally not recommended

  3. Should always be used

  4. Should not be used at all

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The setRememberToken method is generally not recommended because remember tokens create persistent authentication sessions that increase security risk. If a remember token is stolen or compromised, an attacker gains long-term access to the user's account. Security best practices recommend short-lived sessions with re-authentication for sensitive operations rather than persistent tokens.