In spring security, log in is done through the specified login page in the securityconfig class. Following is the code..
@Override
protected void configure(HttpSecurity http) throws Exception {
http.formLogin().loginPage("/login").defaultSuccessUrl("/")
}
But I also want my users to get logged in right after they sign up. I tried something like:
@Override
protected void configure(HttpSecurity http) throws Exception {
http.formLogin().loginPage("/login", "/signup").defaultSuccessUrl("/")
}
But this does not work. How do I do this in spring security?