Interview practice question
Session handling after login
Backend Engineering · Auth and Security · Intermediate
What should happen to the user's session ID when they log in, change their password or log out?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Regenerate session ID on login (prevent fixation).
- Invalidate other sessions on password change (optionally).
- Delete session server-side on logout.
- Short idle timeouts.
- Secure cookie flags.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.