title: What to do with Authorization Code in Spring OAuth2
body: <p>I am using a custom authorization server using Spring. When hitting my protected resource on the client, I am successfully redirected to the auth server. I log in and get the OAuth approval page. Once I authorize the scopes, I am redirected back to my client app with a URL such as:</p>
  
  <p><a href="http://myapp.com/login?code=UjG0wC&amp;state=POez9N" rel="nofollow">http://myapp.com/login?code=UjG0wC&amp;state=POez9N</a></p>
  
  <p>I get that this is the authorization code and it can be exchanged for a token. However, I am having trouble finding examples of how to do this. Do I need to write code to now go and request the token from the auth server, or is there a configuration piece that I am missing? Would it be better to focus on switching to the implicit grant type?</p>