title: OAuth2AuthorizationCodeGrantFilter vs OAuth2LoginAuthenticationFilter in Spring Security OAuth2 client
body: <p>When I am trying to understand OAuth2 client, I am confused about why we have two different filters</p>
  
  <p>I attempted to integrate with Github. Here are my observations</p>
  
  <ol>
  <li><code>OAuth2AuthorizationCodeGrantFilter</code> sound like a filter that exchanges authorization code for access token, but when I keep debug point it does not do that</li>
  <li><code>OAuth2LoginAuthenticationFilter</code> sounds somewhat like it does login somehow, but this filter exchanges auth code to access token instead of above</li>
  </ol>
  
  <p>I'm not sure why this is the case, as the first class name implies some strong correlation to authorization code</p>
  
  <p>Also, Whats is the difference between <code>OAuth2LoginConfigurer</code> &amp; <code>OAuth2ClientConfigurer</code></p>
  
  <p>Looks like <code>OAuth2LoginConfigurer</code> configures <code>OAuth2LoginAuthenticationFilter</code>, while <code>OAuth2ClientConfigurer</code> configures <code>OAuth2AuthorizationCodeGrantFilter</code></p>
  
  <p>Can someone explain what each of them does &amp; in which scenarios they are applicable?</p>
  
  <p>Thanks</p>