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

  1. Please the signup does not work because it never finds a role. What should I do in that case ?

  2. 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?

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

    1. Hi, you need to run backend first, then run SQL script to create some roles in roles table :).

  4. 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!
    Best,
    Peri.

    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 🙂

  5. 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

  6. 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).

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