Web Security · Senior · Question 44 of 75

How can an authorization code or token leak through the Referer header?

Explanation

Redeem the code immediately, replace the URL with history.replaceState, and set a strict Referrer-Policy on callback pages.

Further reading

Problem with a question

Web Security · Senior · question 44

Test yourself

Take the Web Security · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz