I found the answer myself. The wording in this section is a bit confusing, but the attack is quite simple. The "identity provider" is the name of the resource server used to verify the identity of the user.
Basically, this is the case of using an authentication code issued for a client application to obtain an access token by another application. I am trying to more clearly describe the steps.
- An attacker registers a malicious client (for example, an application registered on Facebook).
- The victim’s user is tricked into entering a malicious client using the “Log in with a third party” button (for example, “Log in to Facebook”), initiating the authentication flow of Aode 2.0 OAuth 2.0.
- Malicious client receives authorization_code file.
- An attacker uses the authorization code just obtained with another application and gains access to this application as a user of the victim.
Step 4 is only possible if authorization_codes are not tied to a specific client. Authorization codes issued to a client can only be used by the same client to obtain an access token.
Of course, Facebook is not vulnerable, since it only requires a basic check from the authorization server.
source share