9 thoughts to “Spring Boot Login example: Rest API with MySQL and JWT”

  1. Hi BezKoder,
    Can you please write a post on Angular 13 explaining how to use httponly cookie instead of local storage while working with this SpringBoot backend? It would be really helpful for us.

  2. Hi Mr Bezkoder,
    Could you show me how to use both jwt with header and jwt with HttpOnly Cookie. My project use jwt with HttpOnly Cookie for web api and jwt with header for either api.
    Thank you so much.

    Ps Sorry for my poor English.

  3. thanks for your tutorial, please tell me why do you use @JsonIgnore for property password in UserDetailsImpl class? and Why do you use @Transactional in loadUserByUsername() method in UserDetailsServiceImpl.

  4. Great tutorial! Was wondering if you could delve a little deeper into getting a working front-end for this.
    I don’t know how to modify from localStorage to Cookies.

  5. Hey! Thank you for your great tutorials 🙂
    I stumbled upon an error and I can’t seem to figure out why.
    When I run the application, and use postman to sign in, the console in STS says:
    “Invalid JWT): JWT String argument cannot be null or empty.”
    At the same time, it seems to be working on postman.

    Any ideas why? Any help would be greatly appreciated.

    1. Adding onto this, it doesn’t seem to give an exception like the one above whenever i signout, and sign back in with a different postman tab – I realize this means there is nothing wrong with my code, and I’ve been making my calls to the APIs wrong.
      Sorry for the inconvenience haha

  6. This is a very well-written Spring tutorial. It took me a while to find this but it was worth the time. Thanks!

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