The current OAuth functionality only works on the very specific "ucp.php?mode=login" page. This is somewhat limiting, because it prevents us from including OAuth functionality in other places (like the login form on the index page).
An extension can basically add login forms anywhere they want, without much problems, but not OAuth.
This is because the OAuth links have a built-in redirect link:
This means that the redirect will only function properly if the user is already on the "ucp.php?mode=login" page.
I think we could solve this by changing to get_login_data() method to accept a redirect parameter: