Full Title or Meme
Based on the protocol selection of OpenID Connect or OAuth, the full solution is described in the Identity Model.
The authorization code is obtained by using an authorization server as an intermediary between the client and resource owner. Instead of requesting authorization directly from the resource owner, the client directs the resource owner to an authorization server (via its User Agent as defined in [RFC 2616]), which in turn directs the resource owner back to the client with the authorization code.
Other protocols, like SAML are also available.