The authorization code grant type is used to obtain both access tokens and refresh tokens and is optimized for confidential clients. Since this is a redirection-based flow, the client must be capable of interacting with the resource owner's user-agent (typically a web browser) and capable of receiving incoming requests (via redirection) from the authorization server.
This is a 3-step process:
After those steps, the client owns an access_token that can be used to authorize any subsequent
request.
Parse the location looking for a parameters set by the resource provider server after redirecting the resource owner (user).
Fails with a ParseErr Empty when there's nothing
Authenticate the client using the authorization code obtained from the authorization.
In this case, use the AuthorizationCode constructor.
Redirects the resource owner (user) to the resource provider server using the specified authorization flow.
In this case, use
Codeas aresponseType