title: Why is @EnableOAuth2Sso deprecated?
body: <p>Why is <code>@EnableOAuth2Sso</code> deprecated in Spring Security?
  That's the only reason why OAuth2 will work for me.</p>
  
  <p>If I remove <code>@EnableOAuth2Sso</code>, then this will not work</p>
  
  <pre><code>@Configuration
  @EnableOAuth2Client
  @EnableOAuth2Sso &lt;- Need to have this!
  public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
  
      @Override
      protected void configure(HttpSecurity http) throws Exception {
          http
          .csrf().disable()
          .authorizeRequests()
          .antMatchers("/Intranet/Bokning").authenticated()
          .antMatchers("/**", "/Intranet**").permitAll()
          .anyRequest().authenticated()
          .and().logout().logoutSuccessUrl("/").permitAll();
      }
  
  }
  </code></pre>
  
  <p>Is there another solution? </p>