I have to consume a custom policy on Azure AD B2C on my Spring Boot App.
When I try to "Cancel" from the Forgot Password policy, it takes me to localhost:8443/login?error.
On that page, it shows me
[access_denied] AADB2C90091: The user has cancelled entering self-asserted information. Correlation ID: XXX-XXX-XXX-XXX-XXX Timestamp: 2022-03-18 18:00:37Z
How do I handle such errors in Spring Boot? What changes do I make in WebSecurity.java, if any?
    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http
        .authorizeRequests()
            .antMatchers("/welcome", "/newRegistrationStart", "/logoutSuccess" ).permitAll()
            .antMatchers("/images/*").permitAll()
            .anyRequest().authenticated()
        .and()
            .logout().logoutRequestMatcher(new AntPathRequestMatcher("/logout")).logoutSuccessUrl("/logoutSuccess")
        .and()
            .apply(configurer)
        ;
    }
 
    