What is preventing the following scenario:
- Attacker downloads legitimate app that makes a legitimate OAuth 2.0 Authorization Grant to a desired resource
- Attacker records the client_id and redirect_uri
- Attacker creates phony app in the image of the real thing
- Victim downloads phony app and begins OAuth 2 flow for desired resource
- Phony app provides identical client_id and redirect_uri as legitimate app
- Victim authenticates and authorizes use of desired resource
- Phony app catches the redirect without ever hitting URL (I know iOS can do this) and securing its contained authorization code.
- Phony app now has access to desired resource "in the name" of a legitimate app
Is there any way to actually validate the identity of an app making an authorization request when using a public client (no client_secret)?
Phony app catches the redirect without ever hitting URL
? If this is within the app itself then the app could have simply harvested the credentials when the flow was redirected to the idP. – SilverlightFox