3 thoughts to “Angular 13 + Spring Boot: JWT Authentication & Authorization example”

  1. Hi, thanks for the great tutorial.
    Unfortunatly I have a problem with ”@crossOrigin” used in back-end (spring boot). The erreor logged in console on the navigator is :

    Access to XMLHttpRequest at ‘http://localhost:8080/api/auth/all’ from origin ‘http://127.0.0.1:8081’ has been blocked by CORS policy: The value of the ‘Access-Control-Allow-Origin’ header in the response must not be the wildcard ‘*’ when the request’s credentials mode is ‘include’. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute

    I had applied the annotation in the back-end:
    @CrossOrigin(origins = “http://localhost:8081″, maxAge = 3600, allowCredentials=”true”)

    Any solution please?

    1. Hi, because the configuration is @CrossOrigin(origins = "http://localhost:8081"...), so you should use http://localhost:8081 instead of http://127.0.0.1:8081.

Comments are closed to reduce spam. If you have any question, please send me an email.