I trying to understand how spring security BASIC works with the react JS components and routers. eg. if I have initially
http.authorizeRequests() .antMatchers("/actuator/**").permitAll() .anyRequest().permitAll();
then just by adding
.antMatchers("/api/**").authenticated() I start getting the login prompt for ALL UI routes like the landing page which has nothing to do with API calls. Then I read that React is a single page application and index.html should be added as login page but that didn't work either.
.antMatchers(“/signup”).permitAll()When I added above it is still asking with the login prompt:-
<Route exact path=”/” element={}/>`
I want to keep using the spring basic login PROMPT when some link on the landing page is clicked
PS: I don’t want to use any login PAGE (maybe dat would call authentication.authenticate() perhaps)
I have tried everything I could and used the internet but now this problem is making me more sick. Please help me find dig up this grave temporarily
Awantim Vaas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.