title: Bean 'scopedTarget.oauth2ClientContext' could not be registered same bean name has already been defined in class path
body: <p>I am simple trying to enable google sign in feature for my app but getting this particular error. I don't understand this problem why I am getting it? I need help to fix this error? Any hints? </p>
  
  <pre><code>@Configuration
  @EnableOAuth2Sso
  public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {
  
      @Override
      protected void configure(HttpSecurity http) throws Exception {
          http
                  .csrf()
                      .disable()
                  .antMatcher("/**")
                  .authorizeRequests()
                  .antMatchers("/", "/welcomepage")
                      .permitAll()
                  .anyRequest()
                  .authenticated();
      }
  }
  
  ***************************
  APPLICATION FAILED TO START
  ***************************
  
  Description:
  
  The bean 'scopedTarget.oauth2ClientContext', defined in class path resource [org/springframework/boot/autoconfigure/security/oauth2/client/OAuth2RestOperationsConfiguration$SessionScopedConfiguration$ClientContextConfiguration.class], could not be registered. A bean with that name has already been defined in class path resource [org/springframework/security/oauth2/config/annotation/web/configuration/OAuth2ClientConfiguration$OAuth2ClientContextConfiguration.class] and overriding is disabled.
  
  Action:
  
  Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
  </code></pre>