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

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

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

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

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

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

Leave a Reply

Your email address will not be published.