12 thoughts to “Angular 11 + Spring Boot: JWT Authentication example”

  1. Hi ,
    I need a bit help
    Downloaded the full source code , first of all the roles never create by self , you should add one by one into Roles table , otherwise when you try to sign up its failed and throw ” Roles not found”.
    my question is how do I create a user and give him admin role ? there is not any role chosen when you sign up.

    1. Hi, you can use Postman (a HTTP REST Client) to send request with roles array (including admin) in the body.
      Or you can make your own API with authorization that accept your account to set role for any user (you have role admin and are authorized with POST /user/roles for example).

  2. hi i need help i get this error
    Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: Error: Role is not found.] with root cause

  3. Hey Bozkoder!
    I’m a junior java developer who is currently working on computer science masters program. I’ve recently started learning full stack spring boot rest api and I found your website extremely helpful! You’re doing such a great job and hope to see more tutorials from you! I think you can create a course on udemy and add more detailed videos on Youtube!
    Thanks for sharing this all!

    1. Hi, thank you for your comment 🙂
      I’m so happy to know that my work is helping people like you.

      We, BezKoder Team, are creating a Course that will be public soon 🙂

  4. java.lang.RuntimeException: Error: Role is not found.
    at mr.gov.aspad.referentiel.controllers.AuthController.lambda$registerUser$0(AuthController.java:101) ~[classes/:na]

  5. Thank you for sharing the useful authentication project. I downloaded and tried it. Everything works fine, except the “Forbidden” word is not dispayed when I used user to access admin or mod page. Where is the code for displaying the word “Forbidden”. I searched the word “Forbidden” in the backend code and the frontend code, it is not there. How is it implemented?

Leave a Reply

Your email address will not be published.