should be `beforeRedirect` :)