401 Unauthorized on POST endpoint in Spring Boot (MVC) application

Hi, I am using Spring Boot 3 and Spring Security 6 and following the sample auth0-spring-security5-api-sample/01-Authorization-MVC at use-spring-6 · auth0-samples/auth0-spring-security5-api-sample · GitHub. Tutorial works well until try with GET endpoints. But the moment I built a POST endpoint and call it, I get 401 Unauthorized error in postman even though this is configured to be permitted in SecurityConfig.java. Here is the link to my code changes POST Endpoint to test · ashishrky/auth0-spring-security5-api-sample@8bf9866 · GitHub. What’s wrong? Why GET call work just fine, but POST call get 401?

Hey there!

In order to handle that most effectively can I ask you to raise it as a GitHub issue here in the repo so we can discuss that directly with the repo maintainers? Once you have a link to it you can share it here so we can ping them. Thank you!

Hi @konrad.sopala, I have opened a github issue at… 401 Unauthorized on POST endpoint in Spring Boot (MVC) application · Issue #26 · auth0-samples/auth0-spring-security5-api-sample · GitHub. Thanks

1 Like

Perfect! I’ll ping the repo maintainers in a few minutes!

Hi @konrad.sopala, did you reach out to repo maintainers? I do not see any update on this issue. This issue is blocking usage of auth0 in my project. Can you please help? Thanks.