I need to implement spring basic security for web and auth0 for api in single application but both are not working together
Any one Will help me for this
Hello there @ajeetku, we are be happy to help. When you get a moment can you share some more details on what may be going on. You mentioned Spring which we have a quick start doc for here. We also have detailed documentation on utilizing Auth0’s Authentication API here. Thanks!
Hello James I am able to use auth0 and spring basic security one by one but together
My implemention is something like this but it’s not working
protected void configure(HttpSecurity http) throws Exception {
JwtWebSecurityConfigurer
.forRS256("YOUR_API_AUDIENCE", "YOUR_API_ISSUER")
.configure(http);
http.authorizeRequests()
.antMatchers("/admin/**").access("hasRole('ROLE_ADMIN')")
.antMatchers("/dba/**").access("hasRole('ROLE_ADMIN') or hasRole('ROLE_DBA')")
.and().formLogin();
}
I wanted to follow up @ajeetku and see what error exactly you are getting? Whether it be in the logs or the developer console. I want to understand better the hurdle you’re facing so we can work together to resolve it. Thanks in advance.
We are returning x-auth-tocken from spring basic security after authentication but when using auth0 along with basic security it’s not return tocken after authentication in header
When you get a chance @ajeetku can you DM me your tenant name and a HAR file when reproducing the workflow that produces the error. Once you got it please DM it over to me and I’ll be happy to take a deeper look at what may be going on. Thanks in advance!
Thank you for the HAR file, I will take a deeper look at this and see what I am able to find that may help us troubleshoot the issue.
I wanted to follow up and let you know I reached out to you via a Direct Message in regards to this topic. Thanks.
Thanks you is there any update on this
Hi, did code flow change? Authentication API Explorer
IRCC secret was not necessary for code flow until a week ago.
Thanks!
Thank you for your update
is this related with my problem
Hey there @ajeetku, when you get a chance can you respond to my direct message I sent you that is requesting more information? Thanks in advance!
I wanted to follow up @ajeetku and see if when you get a minute if you could send me an updated HAR file so we can continue to further investigate the issue at hand. Thank you in advance!
Ok I will send you HRA tomorrow
find attached har file localhost.har (392.8 KB)
When digging into the attached HAR file I only see an 401 error of “GET http://localhost:8080/user/getUserDetail” but 200 success prior to that on the same route. Is there any additional details you can share on your setup to help us troubleshoot this challenge? Thanks in advance @ajeetku!
I wanted to reach out again @ajeetku and see if you had any additional details that can help us better identify what may be occurring? Thanks.