 <p>You aren't injecting it. There is no autowiring for the <code>RememberMeConfigurer</code>. Also why are you configuring so many beans?</p> <p>The <code>RememberMeAuthenticationProvider</code> is already created for you, if you want to use a different key specify it using <code>key("KEY")</code>. This in turn will be used to create the <code>RememberMeServices</code>.</p> <pre><code>@Configuration @EnableWebSecurity @EnableGlobalMethodSecurity(securedEnabled = true) public class SecurityConfig extends WebSecurityConfigurerAdapter { @Autowired UserDetailsService userDetailsService; @Autowired DatabasePersistentTokeRepositoryImpl databasePersistentTokeRepositoryImpl; @Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth.userDetailsService(userDetailsService).passwordEncoder(new BCryptPasswordEncoder()); } @Override protected void configure(HttpSecurity http) throws Exception { http .rememberMe() .key("KEY") .tokenRepository(databasePersistentTokeRepositoryImpl) .tokenValiditySeconds((int) TimeUnit.SECONDS.convert(7, TimeUnit.DAYS)) .and() .csrf().disable(); } } </code></pre> <p>If you really need to set the <code>alwaysRemember</code> property to true you could use an <code>ObjectPostProcessor</code> to post process the filter and configure the <code>RememberMeServices</code> from there. </p> <p>You would also have injected the wrong type of <code>RememberMeServices</code> as the one configured doesn't use the <code>PersistentTokeRepository</code>.</p>