Retrieve OAuth2 token with HTTP socket
The webview gets redirected to a local socket and sends a http request to it.
The requests argument includes the token. Thus, we don't need to guess the
token page URL (which led to problems in the past).
The old method is deprecated and this method is the recommended one.