14 thoughts to “Angular 12 + Spring Boot: JWT Authentication example | Spring Security”

  1. hey please sir How can I get the data from a table that has two primary keys from two entity classes?
    The data of table user_roles , because im not able to delete a line on table user without deleting it first on table user_roles .

  2. Very good tutorial sir, very detailed. But can you please do CRUD with users within this project? Much appreciate!

    1. Yess ive been suffering for almost 10 days trying to add the crud to this project , if u are in we can try to do it together i already did the add and search buttons , update too the request work on postman but it does not work with angular .

  3. hey man this is really good and iam a bit new to this can you explain to me how to set the role when making a registration or you do it directly in the db ?

    1. Hi, currently mod and admin roles are set directly using HTTP POST request (see backend tutorial for details). You can set the role when registering new user by adding a roles field (array) on client side submit form.

  4. hello ,
    i want to validate username and password from database using angular without jwt token.

  5. Hi before angular 12 I use this.userService.getUser(this.authService.decodedToken.nameid) but in angular 12 my token wasn’t decoded what can I do

  6. Hi, thanks a lot for these tutorials and sharing your knowledge, truly appreciate it!

    The tutorials are really hands on and few of the best I have seen!

    For this particular one though, I couldn’t see the code repo attached, please could you share the github link?


    1. Hi, you can find Github link for backend and frontend in the tutorials that I mention at Conclution section.

  7. Hi, sorry to bother you but i have a problem really don’t know how to do it.

    for tutorial Angular + Jwt +SpingBoot, in auth.interceptor.ts file
    you say that if use Sping Boot backend, it should be : const TOKEN_HEADER_KEY = ‘Authorization’;
    and for Node.js back-end we need add this : const TOKEN_HEADER_KEY = ‘x-access-token’;

    so i want to know how should i add in Django back-end
    really really thank you!!!

    1. Hi, it depends on which front-end header you use to shake hand with back-end.
      For example, I check x-access-token in Node.js and x-access-token for Spring Boot server.

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