title: Spring Boot - React Failed to authorize filter invocation
body: <p>Hi all I'm new to spring boot and react, I'm working on the simple login app <strong>using react js and spring boot</strong>,
  whenever I try to navigate to a different API call (e.g logout,  welcome) I get the following message
  <strong>Failed to authorize filter invocation [GET /welcome] with attributes [authenticated]</strong>
  I think this is something with WebSecurityConfigurerAdapter
  looking for a proper solution</p>
  <pre><code>@Override
  protected void configure(HttpSecurity httpSecurity) throws Exception {
      httpSecurity.csrf().disable().sessionManagement().sessionFixation().migrateSession().and()
              //.addFilterAfter(new AuthenticationFilter(), UsernamePasswordAuthenticationFilter.class).csrf().disable()
              .authorizeRequests()
              .antMatchers(&quot;/&quot;).permitAll()
              .anyRequest().authenticated()
              .and().formLogin().loginPage(&quot;/login&quot;).and()
              .logout()
              .logoutUrl(&quot;/logout&quot;).invalidateHttpSession(true).deleteCookies().clearAuthentication(true)
              .permitAll()
              .and()
              .exceptionHandling().accessDeniedPage(&quot;/403&quot;).and().httpBasic();
  }
  </code></pre>
  <p>handleDashboard() {</p>
  <pre><code>axios.get(&quot;http://localhost:8080/welcome&quot;,{ withCredentials: true }).then(res =&gt; {
    if (res.data === &quot;success&quot;) {
      this.props.history.push(&quot;/&quot;);
    } else {
      alert(&quot;Authentication failure&quot;);
    }
  });
  </code></pre>
  <p>}</p>
  <p><a href="https://i.stack.imgur.com/0RWXR.png" rel="noreferrer">WebSecurityConfig</a>
  <a href="https://i.stack.imgur.com/pFNNT.png" rel="noreferrer">log output</a></p>