OAuth mix-up defense needs the RFC 9207 issuer response check
An OAuth client that supports more than one authorization server has a routing problem that ordinary state validation does not solve. A malicious authorization server can return an authorization response that the client mistakes for one from a trusted server. RFC 9207 addresses this class of mix-up attacks by adding an iss parameter to the authorization response. The value identifies the authorization server that created the response, including error responses. The client then compares it with the issuer value it trusts for that authorization transaction.
The check is small, but its placement matters. It belongs before the client exchanges an authorization code. The callback handler should already know which issuer it selected for the transaction from server-side state or another protected correlation record.…