Post Login issue

After logging into my app, it always goes to : http://localhost:8080/line-awesome/svg/star.svg?continue or some other line-awesome icon. I set break points in my Dashboard and the MainLayout(where the icons are used) but it never hits them after logging in. I followed the tutorial and also used the starter app. The funny thing is, it didn’t used do this. It just started happening one day for no apparent reason. I’m stumped. Also, as shows in the screenshot, nothing special going on with my routes.
image.png

I’ve seen this from other users… it’s related to the order in which the browser is loading the resources and redirect page. I have two workarounds in mind:

  • implement a authentication success handler and redirect explicit to your corresponding view
  • add those icons to the spring security ignore directive

i think its the second point from @quirky-zebra, you have to allow request to the line-awesome resources in your security config

authorizeHttpRequestsCustomizer.requestMatchers(new AntPathRequestMatcher("/line-awesome/**/*.svg")).permitAll();

Yep! The last one was it. I added in the path matcher for lib-awesome, login took me to my root page(/). Removed it, just to make sure it wasn’t a fluke, and it displayed the icon again.

This seems like an odd behavior. I don’t understand why it’s showing the icon it isn’t permitted a path too. There’s a lot of spring security that I don’t yet understand.