- User wants to create a new account at website.com
- website.com has been compromised to inject the attackers facebook login
- User chooses to create an account by linking with facebook. They click Link with Facebook and are redirected back to website.com logged into their new account
- Attacker can now access User's account on website.com by logging in with the injected facebook credentials
It seems like the attacker would need to somehow generate a unique facebook login for each exploited user though. I think if you try to "connect with facebook" with a website that already has an account for the facebook login it often logs you in rather then creates an additional account.
Thus, if a site has URLs that can be constructed to make a 302 to an attacking site, like https://www.google.com/redirect?url=http://www.example.com/, it's possible to craft a redirect URL that would take you to the authentication dialog but return the token to a redirect URL which will in turn pass the token to the attacker.
> Now to all OAuth flows Facebook will respond with Attacker's profile information and Attacker's uid.
> as long as attacker can replace your identity on Facebook with his identity and connect their Facebook account to victim's account on the website just loading CLIENT/fb/connect URL.
was not clear to me.