Skip to content
Sharp

Authentication · interview question

Why does a CSRF token in web applications matter in practice?

Multiple choiceEasychapter-17-curatedpremiumauthenticationsalting-and-bcrypt
Choose one answer
Answer and explanation

Correct answer

A. To prevent unauthorized actions on behalf of a user.

Why

A CSRF token is used to prevent Cross-Site Request Forgery attacks. It ensures that requests made on behalf of a user are genuine and authorized, preventing malicious actions from being executed without the user's consent.

Test yourself on Authentication

A free test with instant, explained results. No account needed.

Start free test
All Authentication questions →