Skip to content
Sharp

Authentication · interview question

Why does a CSRF token matter in practice?

Multiple choiceEasychapter-17-curatedpremiumauthenticationjwt-signatures
Choose one answer
Answer and explanation

Correct answer

A. To prevent cross-site request forgery attacks.

Why

CSRF tokens are used to prevent cross-site request forgery attacks by ensuring that requests to change user information come from the authenticated user's client, not a malicious site.

Test yourself on Authentication

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

Start free test
All Authentication questions →