I’m trying to implement SpringBoot Security’s LoginForm and have it talk with my react application. I’m currently following the tutorial below:
I’ve reached the part where it talks about implementing the configuration for the LoginForm itself. It states the following code:
http // ... .and() .formLogin() .loginPage("/login.html") .loginProcessingUrl("/perform_login") .defaultSuccessUrl("/homepage.html", true) .failureUrl("/login.html?error=true") .failureHandler(authenticationFailureHandler()) .and() .logout() .logoutUrl("/perform_logout") .deleteCookies("JSESSIONID") .logoutSuccessHandler(logoutSuccessHandler());
The main part of that to take away is the
authenticationFailureHandler() and the
Neither of them exist within
WebSecurityConfigurerAdapter, nor does the article actually implement them. Do I have to create a customer version of both in this instance?
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
At the bottom of the article, they provide a link to their GitHub project containing all of the code from the article.
Here is a link to file of this project, containing the code you mention.
But in short, they do implement a custom version of it.
Also, it seems that tihs question was accidentally mistakenly tagged with